frePPLe / frepple

frePPLe - open source supply chain planning
https://frepple.com
Other
519 stars 242 forks source link

fix: docker add SECURE_PROXY_SSL_HEADER env config #653

Closed sorvis closed 4 months ago

sorvis commented 4 months ago

Found that when running in Kubernetes behind an nginx proxy that adds https then was seeing the following error in the logs:

[Fri May 17 13:51:18.518462 2024] [wsgi:error] [pid 28:tid 136755443365632] [remote 10.20.2.3:39312] ERROR CSRF failure detected
[Fri May 17 13:51:18.518699 2024] [wsgi:error] [pid 28:tid 136755443365632] [remote 10.20.2.3:39312] INFO Forbidden (Origin checking failed - https://frepple.kencove.com/ does not match any trusted origins.): /data/login/

See also: https://stackoverflow.com/questions/70501974/django-returning-csrf-verification-failed-request-aborted-behind-nginx-prox

As a fix added a variable _SECURE_PROXY_SSLHEADER when set it will un-comment that line in the config file.

jdetaeye commented 4 months ago

I prefer not to merge this one: