diff --git a/federation_authority/federation_authority/settingslocal.py b/federation_authority/federation_authority/settingslocal.py index a21f23b..13d7290 100644 --- a/federation_authority/federation_authority/settingslocal.py +++ b/federation_authority/federation_authority/settingslocal.py @@ -35,6 +35,8 @@ LOGOUT_REDIRECT_URL = "/oidc/rp/landing" LOGIN_URL = "/oidc/rp/landing" ALLOWED_HOSTS = [item.strip() for item in os.getenv('DJANGO_ALLOWED_HOSTS', '*').split(',') if item.strip()] +USE_X_FORWARDED_HOST = True +SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https") AUTH_USER_MODEL = 'spid_cie_oidc_accounts.User' INSTALLED_APPS = [ diff --git a/federation_authority/federation_authority/settingslocal.py.example b/federation_authority/federation_authority/settingslocal.py.example index 8e34a8e..9ad53cb 100644 --- a/federation_authority/federation_authority/settingslocal.py.example +++ b/federation_authority/federation_authority/settingslocal.py.example @@ -111,6 +111,8 @@ FEDERATION_DEFAULT_POLICY = { } ALLOWED_HOSTS = ['*'] +USE_X_FORWARDED_HOST = True +SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https") AUTH_USER_MODEL = 'spid_cie_oidc_accounts.User' INSTALLED_APPS = [ diff --git a/provider/provider/settingslocal.py b/provider/provider/settingslocal.py index 245dd17..8e368bb 100644 --- a/provider/provider/settingslocal.py +++ b/provider/provider/settingslocal.py @@ -42,6 +42,8 @@ LOGOUT_REDIRECT_URL = "/oidc/op/landing" LOGIN_URL = "/oidc/op/landing" ALLOWED_HOSTS = [item.strip() for item in os.getenv('DJANGO_ALLOWED_HOSTS', '*').split(',') if item.strip()] +USE_X_FORWARDED_HOST = True +SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https") AUTH_USER_MODEL = 'spid_cie_oidc_accounts.User' INSTALLED_APPS = [ diff --git a/provider/provider/settingslocal.py.example b/provider/provider/settingslocal.py.example index 6514098..145b6ea 100644 --- a/provider/provider/settingslocal.py.example +++ b/provider/provider/settingslocal.py.example @@ -40,6 +40,8 @@ LOGOUT_REDIRECT_URL = "/oidc/op/landing" LOGIN_URL = "/oidc/op/landing" ALLOWED_HOSTS = ['*'] +USE_X_FORWARDED_HOST = True +SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https") AUTH_USER_MODEL = 'spid_cie_oidc_accounts.User' INSTALLED_APPS = [ diff --git a/relying_party/relying_party/settingslocal.py b/relying_party/relying_party/settingslocal.py index 748cb57..da9f1c5 100644 --- a/relying_party/relying_party/settingslocal.py +++ b/relying_party/relying_party/settingslocal.py @@ -48,6 +48,8 @@ VISIONE_DEFAULT_PROVIDER = os.getenv("DJANGO_RP_DEFAULT_PROVIDER", provider_issu VISIONE_DEFAULT_PROFILE = "cie" ALLOWED_HOSTS = [item.strip() for item in os.getenv('DJANGO_ALLOWED_HOSTS', '*').split(',') if item.strip()] +USE_X_FORWARDED_HOST = True +SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https") AUTH_USER_MODEL = 'spid_cie_oidc_accounts.User' INSTALLED_APPS = [ diff --git a/relying_party/relying_party/settingslocal.py.example b/relying_party/relying_party/settingslocal.py.example index 640d253..24faaf3 100644 --- a/relying_party/relying_party/settingslocal.py.example +++ b/relying_party/relying_party/settingslocal.py.example @@ -42,6 +42,8 @@ LOGOUT_REDIRECT_URL = "/oidc/rp/landing" LOGIN_URL = "/oidc/rp/landing" ALLOWED_HOSTS = ['*'] +USE_X_FORWARDED_HOST = True +SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https") AUTH_USER_MODEL = 'spid_cie_oidc_accounts.User' INSTALLED_APPS = [