Skip to content

Commit

Permalink
updated docker nginx proxy config
Browse files Browse the repository at this point in the history
  • Loading branch information
jabelone committed Aug 28, 2023
1 parent f5739b0 commit 99e2873
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docker/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,11 @@ http {
proxy_redirect off;
proxy_pass http://app_server;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Real-IP $http_x_real_ip;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
}
}
}
3 changes: 3 additions & 0 deletions memberportal/membermatters/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,5 +291,8 @@

OIDC_USERINFO = "membermatters.oidc_provider_settings.userinfo"

USE_X_FORWARDED_HOST = True
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")

# Needed for testing OIDC on local development environment with ngrok (oauth requires HTTPS)
# SITE_URL = "https://1bd0-122-148-148-138.ngrok-free.app"

0 comments on commit 99e2873

Please sign in to comment.