New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Forbidden (403) CSRF verification failed. #670
Comments
Hmm, have you tried https://stackoverflow.com/a/70326426/5331804 , does that solve it? |
So i added CSRF_TRUSTED_ORIGINS = ['https://paperlessdev.mydomain.com'] and it started working.... sorry for late reply i had to figure how to add it :D |
Thanks for confirming. Presumably this will be an issue for all users in the next version and would probably warrant a (yep) new environment variable especially from docker eg |
@paperless-ngx/backend we already have Feels like too many though they do do different things. The following are core Django settings (
Maybe we just use |
So first i tried with deleting all the env and adding just
After that, i added each variable separated: And it started working. Just as an info to maybe add in documentation, PAPERLESS_CSRF_TRUSTED_ORIGINS = https://paperlessdev.site.com has to be without last /. I had / at the end and i got the same error as before. |
Tested in |
Thanks for testing, glad it works! There is actually a note about not including the trailing slash for ‘PAPERLESS_URL`, see https://github.com/paperless-ngx/paperless-ngx/blob/dev/docs/configuration.rst#hosting--security |
Sorry @miku323 just to confirm if you set |
Yes. That is correct. It works. |
Closed in branch by dde7771 |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion or issue for related concerns. |
Description
I have
dev
version of paperless open to the internet, so I can play around with translations and mobile apps while on the go. For the last few days I have found that I cannot log in any more I get the error pictured below:Expected behavior
Getting logged in into the website
Steps to reproduce
Webserver logs
Screenshots
No response
Paperless-ngx version
1.6.0 dev
Host OS
Linux/Unraid
Installation method
Docker
Browser
chrome
Configuration changes
/
Other
There were changes in how django works in 4.0.0+.
The text was updated successfully, but these errors were encountered: