Seafile CSRF Verification Fix

Seafile CSRF Verification Fix

There seems to be a little bug when using seafile through nginx proxy manager that will throw the following error after logging in.

seafile forbidden (403) csrf verification failed. request aborted. more information is available with debug=true.

This is due to a security feature with Django to resolve this you will need to do the following:

Navigate to seafile conf

/path/to/seafile-data/seafile/conf
nano seahub_settings.py

add the following line at the bottom of the file (edit with your domain

CSRF_TRUSTED_ORIGINS = ["https://yourdomain.com", "https://www.yourdomain.com"]

write and quit, and docker-compose up

the issue should now be fixed!