configure reverse proxy header for proper TLS
This commit is contained in:
parent
ddd1cd70ad
commit
05742d9f1c
2 changed files with 8 additions and 1 deletions
|
@ -42,7 +42,10 @@
|
|||
|
||||
# Proxy all other requests to Gunicorn
|
||||
handle {
|
||||
reverse_proxy unix//app/run/gunicorn.sock
|
||||
reverse_proxy unix//app/run/gunicorn.sock {
|
||||
header_up X-Forwarded-Proto https
|
||||
header_up X-Forwarded-Host {host}
|
||||
}
|
||||
}
|
||||
|
||||
# Basic compression for better performance
|
||||
|
|
|
@ -55,6 +55,10 @@ CSRF_TRUSTED_ORIGINS = [f"https://{h}" for h in HTTPS_HOSTS] + [
|
|||
# Primary website URL
|
||||
WEBSITE_URL = env.str("WEBSITE_URL", default="https://servala.com")
|
||||
|
||||
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")
|
||||
USE_X_FORWARDED_HOST = True
|
||||
USE_X_FORWARDED_PORT = True
|
||||
|
||||
# Application definition
|
||||
|
||||
INSTALLED_APPS = [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue