I could log in fine before I did the Let’s Encrypt SSL. Now I get to the log-in page which is encrypted (green padlock) but when I put in my admin name & password I end up at the 403 page.
Chrome Problem only, N/A, no answer provided, and my issue exists in all browsers
No custom port in my setup, N/A
Looked liked a potential solution, but “replace proxy_set_header Host $host:$server_port; with proxy_set_header Host $host; in nginx config”. did not provide a working solution, after inputting credentials end up at a white loading screen" with spinning orb. So it did make the error go away but not a usable fix. Maybe it’s a part of the solution, TBD
Have to change back to proxy_set_header Host $host:$server_port; to stop.
If I missed anything please let me know. Otherwise help, would be greatly appreciated!
i upgraded my Docker install to latest (6.3.4) and since then i have the same CSRF Problem es described here in ths thread.
In my nginx conf i have proxy_set_header Host $host; automaticaly set, since i’m using the latest Docker image. But still i get the CSRF.
I searched the forum an google and try to place a
CSRF_TRUSTED_ORIGINS = ‘myserver’ in the seahub_settings.py. To no efect
The sugeted solution seafile issues 2118 to add the line
proxy_pass_header Set-Cookie; in the nginx config as well didn’t solve it…
By now I’m at a loss what else i could try.
I am late to this thread, but just experienced this problem. Running Apache as the box’s primary web server, then have Seafile running in Docker with NGINX using alternative ports 1080 and 8443.
I do have Apache do a redirect
RewriteRule ^ https://%{SERVER_NAME}:8443%{REQUEST_URI} [END,NE,R=permanent]
This particular grief was SOLVED by changing the NGINX virtual server file:
Added the alternative port to the proxy_set_header config.
CSRF_TRUSTED_ORIGINS worked for me too, but I would like some more details. Is this just a work-around that should be removed when this bug is fixed, or is this a new config option that should be set when deploying servers from now on?
In you modified the port mapping, the origin field in the HTTP header received by Django is http{s}://{ip_or_domain}:20080 and the host field in HTTP header is {ip_or_domain} without the custom port. This mismatch results in a CSRF error.
However, in the original HTTP request sent by the browser, the origin and host fields are both http{s}://{ip_or_domain}:20080 . The mismatch is caused by the wrong Nginx setting.
You can correct it by changing Nginx config to the following: