Improved CORS!!!!

This commit is contained in:
Scott Idem
2022-11-29 15:12:04 -05:00
parent 3de7d580dc
commit e4ca27a84d
2 changed files with 27 additions and 62 deletions

View File

@@ -30,6 +30,28 @@ class Settings(BaseSettings):
FILES_PATH = {}
# CORS Origins
ORIGINS_REGEX = '(https://.*\.oneskyit\.com)|(http://.*\.oneskyit\.local)|(http://.*\.oneskyit\.local:5000)|(http://.*.localhost)|(http://.*.localhost:5000)'
ORIGINS = [
'https://oneskyit.com',
'http://app-local.oneskyit.com',
'http://192.168.32.20:3000',
'http://192.168.32.20:8080',
'http://localhost',
'http://localhost:3000',
'http://localhost:5000',
'http://localhost:8080',
'http://localhost:7800',
'http://fastapi.localhost',
'http://demo.localhost:5000',
'http://svelte.oneskyit.local:5555',
]
# HTTP Status Dict List
HTTP_STATUS_LI = {}
HTTP_STATUS_LI[200] = { 'name': 'OK', 'message': 'The request has succeeded.' }