diff --git a/smoothschedule/config/settings/base.py b/smoothschedule/config/settings/base.py index 97192d0..2b6ad97 100644 --- a/smoothschedule/config/settings/base.py +++ b/smoothschedule/config/settings/base.py @@ -325,6 +325,8 @@ CORS_ALLOWED_ORIGINS = env.list( "http://localhost:3000", "http://localhost:5173", "http://127.0.0.1:5173", + "http://lvh.me:5173", + "http://lvh.me:5174", ], ) @@ -332,7 +334,7 @@ CORS_ALLOWED_ORIGINS = env.list( # Production: configure via DJANGO_CORS_ALLOWED_ORIGIN_REGEXES _cors_regexes = env( "DJANGO_CORS_ALLOWED_ORIGIN_REGEXES", - default="", + default="^http(s)?://.*\\.lvh\\.me(:\\d+)?$", # Allow all *.lvh.me subdomains ) CORS_ALLOWED_ORIGIN_REGEXES = [ regex.strip() for regex in _cors_regexes.split(",") if regex.strip()