Skip to content
Snippets Groups Projects
Commit 28fb9ae8 authored by Ernesto Rico Schmidt's avatar Ernesto Rico Schmidt
Browse files

Do not get CORS_ALLOWED_ORIGINS from the environment

parent 95001b1e
No related branches found
No related tags found
No related merge requests found
...@@ -30,15 +30,7 @@ MANAGERS = ADMINS ...@@ -30,15 +30,7 @@ MANAGERS = ADMINS
ALLOWED_HOSTS = os.getenv("ALLOWED_HOSTS", default="127.0.0.1,localhost").split(",") ALLOWED_HOSTS = os.getenv("ALLOWED_HOSTS", default="127.0.0.1,localhost").split(",")
# Whitelist origins that access the API # Whitelist origins that access the API
CORS_ALLOWED_ORIGINS = os.getenv( CORS_ALLOWED_ORIGINS = ["http://localhost:8080", "http://localhost:8040"]
"CORS_ALLOWED_ORIGINS",
default=os.getenv(
# This is for backwards compatibility as
# CORS_ALLOWED_ORIGINS was named CORS_ORIGIN_WHITELIST in the past.
"CORS_ORIGIN_WHITELIST",
default=("http://localhost:8080", "http://localhost:8040"),
),
)
CORS_ALLOW_CREDENTIALS = True CORS_ALLOW_CREDENTIALS = True
CORS_ALLOW_HEADERS = list(default_headers) + [ CORS_ALLOW_HEADERS = list(default_headers) + [
"content-disposition", "content-disposition",
...@@ -172,17 +164,17 @@ OIDC_EXTRA_SCOPE_CLAIMS = "steering.oidc_provider_settings.AuraScopeClaims" ...@@ -172,17 +164,17 @@ OIDC_EXTRA_SCOPE_CLAIMS = "steering.oidc_provider_settings.AuraScopeClaims"
if os.getenv("STEERING_PORT"): if os.getenv("STEERING_PORT"):
SITE_URL = ( SITE_URL = (
os.getenv("AURA_PROTO", default="http") os.getenv("AURA_PROTO", default="http")
+ "://" + "://"
+ os.getenv("AURA_HOST", default="localhost") + os.getenv("AURA_HOST", default="localhost")
+ ":" + ":"
+ os.getenv("STEERING_PORT") + os.getenv("STEERING_PORT")
) )
else: else:
SITE_URL = ( SITE_URL = (
os.getenv("AURA_PROTO", default="http") os.getenv("AURA_PROTO", default="http")
+ "://" + "://"
+ os.getenv("AURA_HOST", default="localhost") + os.getenv("AURA_HOST", default="localhost")
) )
# WSGI_APPLICATION = 'steering.wsgi.application'; # WSGI_APPLICATION = 'steering.wsgi.application';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment