Regex para cors en localhost
This commit is contained in:
@@ -5,7 +5,13 @@ SECRET_KEY = os.environ.get('DJANGO_SECRET_KEY')
|
|||||||
ALLOWED_HOSTS = ['musiclist-api.danielcortes.xyz']
|
ALLOWED_HOSTS = ['musiclist-api.danielcortes.xyz']
|
||||||
|
|
||||||
CORS_ORIGIN_ALLOW_ALL = False
|
CORS_ORIGIN_ALLOW_ALL = False
|
||||||
CORS_ORIGIN_WHITELIST = ['musiclist.danielcortes.xyz', 'localhost', '127.0.0.1']
|
CORS_ORIGIN_WHITELIST = [
|
||||||
|
'musiclist.danielcortes.xyz',
|
||||||
|
]
|
||||||
|
CORS_ORIGIN_REGEX_WHITELIST = [
|
||||||
|
'localhost((:\d)\d{0,3})?',
|
||||||
|
'127.0.0.1((:\d)\d{0,3})?',
|
||||||
|
]
|
||||||
|
|
||||||
"""Security"""
|
"""Security"""
|
||||||
SECURE_HSTS_SECONDS = 31536000
|
SECURE_HSTS_SECONDS = 31536000
|
||||||
|
|||||||
Reference in New Issue
Block a user