Enable beta auto-deploy on master; prod via manual button
Closes #26. Split deploy.yml into deploy-beta (push→master) and deploy-prod (workflow_dispatch), wire beta hosts/CORS defaults, and document beta secret + Tianji coordination with chat_web_app.
This commit is contained in:
@@ -59,3 +59,11 @@ class CapacitorWebviewOriginTests(SimpleTestCase):
|
||||
from django.conf import settings
|
||||
|
||||
self.assertFalse(settings.CORS_ALLOW_CREDENTIALS)
|
||||
|
||||
def test_default_cors_includes_beta_frontend(self):
|
||||
from django.conf import settings
|
||||
|
||||
self.assertIn(
|
||||
"https://beta.chat.aimloperations.com",
|
||||
settings.CORS_ALLOWED_ORIGINS,
|
||||
)
|
||||
|
||||
@@ -122,7 +122,9 @@ DEBUG = env_bool("DJANGO_DEBUG", DJANGO_ENV == "dev")
|
||||
|
||||
allowed_hosts = env_list(
|
||||
"DJANGO_ALLOWED_HOSTS",
|
||||
"localhost,127.0.0.1,0.0.0.0,chatbackend.aimloperations.com,chat.aimloperations.com",
|
||||
"localhost,127.0.0.1,0.0.0.0,"
|
||||
"chatbackend.aimloperations.com,chat.aimloperations.com,"
|
||||
"beta.chatbackend.aimloperations.com,beta.chat.aimloperations.com",
|
||||
)
|
||||
ALLOWED_HOSTS = allowed_hosts if allowed_hosts else ["*"]
|
||||
|
||||
@@ -139,7 +141,8 @@ CORS_ORIGIN_ALLOW_ALL = env_bool("CORS_ORIGIN_ALLOW_ALL", True)
|
||||
CORS_ALLOWED_ORIGINS = with_capacitor_webview_origins(
|
||||
env_list(
|
||||
"CORS_ALLOWED_ORIGINS",
|
||||
"http://localhost:3000,http://127.0.0.1:3000,https://chat.aimloperations.com",
|
||||
"http://localhost:3000,http://127.0.0.1:3000,"
|
||||
"https://chat.aimloperations.com,https://beta.chat.aimloperations.com",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user