added django-cors-headers to pyswiss: allows browser fetch from *.earthmanrpg.me and localhost

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Disco DeDisco
2026-04-13 23:08:32 -04:00
parent 02a7a0ef2e
commit 3fd1f5e990
2 changed files with 12 additions and 0 deletions

View File

@@ -8,11 +8,22 @@ DEBUG = os.environ.get('DEBUG', 'true').lower() != 'false'
ALLOWED_HOSTS = os.environ.get('ALLOWED_HOSTS', '*').split(',') ALLOWED_HOSTS = os.environ.get('ALLOWED_HOSTS', '*').split(',')
INSTALLED_APPS = [ INSTALLED_APPS = [
'corsheaders',
'django.contrib.contenttypes', 'django.contrib.contenttypes',
'django.contrib.auth', 'django.contrib.auth',
'apps.charts', 'apps.charts',
] ]
MIDDLEWARE = [
'corsheaders.middleware.CorsMiddleware',
'django.middleware.common.CommonMiddleware',
]
CORS_ALLOWED_ORIGIN_REGEXES = [
r'^https://.*\.earthmanrpg\.me$',
r'^http://localhost(:\d+)?$',
]
ROOT_URLCONF = 'core.urls' ROOT_URLCONF = 'core.urls'
DATABASES = { DATABASES = {

View File

@@ -1,3 +1,4 @@
django==6.0.4 django==6.0.4
django-cors-headers==4.3.1
gunicorn==23.0.0 gunicorn==23.0.0
pyswisseph==2.10.3.2 pyswisseph==2.10.3.2