Yunohost 4.3.6.2/old laptop@home/dynamic ip
I have installed cusdis in another server at home (docker), it’s up and running.
I have installed a redirect app to the ip:port of the cusdis app (proxypass for all).
The backend is accessible, but the integration is not working.
I get this error in the console of chrome
Access to script at 'https://sub.domain/js/iframe.umd.js' from origin 'null' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header contains the invalid value 'null//undefined'.
I searched the forum for this error, but it seems that every post is a specific case.
Should I edit /etc/nginx/conf.d/$domain.d/redirect.conf
or /etc/nginx/conf.d/$domain.conf
?
Thanks for the help
I’ve finally found a solution
opened 10:02PM - 29 Aug 21 UTC
Thanks for making this really cool tool, exactly what I was looking for on my bl… og! I have this annoying, difficult to reproduce issue, of which I'm not entirely sure it's a bug or some problem with my own configuration but I thought I'd share here just in case. When I load a page, more often than not the comment section does not appear. When I inspect the element, Firefox and Chrome give me the errors:
`Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://cusdis.domain.com/js/iframe.umd.js. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).`
and
`Access to script at 'https://cusdis.domain.com/js/iframe.umd.js' from origin 'https://domain.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.`
respectively. The strange thing is that Firefox sometimes IS able to load the comment box without an error, without changing any configuration. I honestly don't know anything about CORS, tried looking into it and messing with my nginx configuration, but I keep getting different kinds of errors, which makes me think it might be a bug of some kind. Apologies if it isn't.
About my system and configuration: I'm trying to run cusdis on my VPS where my static blog is also hosted. OS is Debian 10, I'm using nginx as webserver, and certbot to manage SSL certificates. I created a subdomain `cusdis.domain.com` since my blog already uses `domain.com`. I created a docker-compose config as stated in [the docs](https://cusdis.com/doc#/self-host/docker) using postgresql, and have set `- NEXTAUTH_URL=https://cusdis.domain.com` (and of course modified passwords & usernames). My nginx configuration:
```
server {
root /var/www/html/domain.com;
index index.html;
server_name domain.com www.domain.com;
location / {
try_files $uri $uri/ =404;
error_page 404 /404.html;
}
listen [::]:443 ssl; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/domain.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/domain.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
server_name cusdis.domain.com;
access_log /var/log/nginx/cusdis.domain.com.log proxy;
location / {
proxy_pass http://localhost:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/domain.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/domain.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
```
The code must be added to the redirect.conf
It’s working fine for more than two weeks.
Hope this will help the packaging of cusdis to yunohost in