server icon indicating copy to clipboard operation
server copied to clipboard

Allow etebase server to run on non standard ports

Open jrvarma opened this issue 1 year ago • 0 comments

When the nginx is serving pages on a non standard http or https port, an attempt to login at the admin page leads to a 403 error
CSRF verification failed. Request aborted.

With debug = true, the detailed error is
Origin checking failed xxx does not match any trusted origins

The solution is to add the non standard port to the url in CSRF_TRUSTED_ORIGINS in settings.py. To accomplish this, this pull request

  1. Adds a new section ports to the example etebase-server.ini where the user can specify the non standard port(s).
  2. Adds code to settings.py to include any non standard port configured as above to the urls in CSRF_TRUSTED_ORIGINS

Merging this pull request would close Issue 189

jrvarma avatar Oct 18 '24 07:10 jrvarma