Skip to content

Commit d4c3b18

Browse files
authored
Merge pull request #73 from OS2borgerPC/proxy-configuration
Proxy configuration
2 parents abc5638 + 39b93f7 commit d4c3b18

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

admin_site/os2borgerpc_admin/settings.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,12 @@
8282
else:
8383
CSRF_TRUSTED_ORIGINS = []
8484

85+
# Proxy setup
86+
if os.environ.get("USE_X_FORWARDED_HOST"):
87+
USE_X_FORWARDED_HOST = True
88+
if os.environ.get("SECURE_PROXY_SSL_HEADER"):
89+
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")
90+
8591
# Local time zone for this installation. Choices can be found here:
8692
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
8793
# although not all choices may be available on all operating systems.

0 commit comments

Comments
 (0)