liumcse / ntuvibe

NTUVibe is a student-run online platform committed to making information at Nanyang Technological University more open and accessible.
https://ntuvibe.com
8 stars 0 forks source link

Request of modification in django-cors settings #79

Closed chenchongsong closed 5 years ago

chenchongsong commented 5 years ago

Modify django-cors in settings.py, to allow multiple ntuvibe subdomains

CORS_ALLOW_CREDENTIALS = True
CORS_ORIGIN_REGEX_WHITELIST = ( 
        r"^(https?://)?localhost:\d{4}$",
        r"^(https?://)?127\.0\.0\.1:\d{4}$",
        r"^(https?://)?([\w\-]+\.)?ntuvibe\.com$",
)

# CORS_ORIGIN_WHITELIST = (
#       "localhost:8080",
#       "127.0.0.1:8000",
#       "127.0.0.1:8080",
#       "ntuvibe.com",
# )
chenchongsong commented 5 years ago

83