From ea841031df494c6b918ad5d1e30f95b85e5a59f4 Mon Sep 17 00:00:00 2001 From: yuetsh <517252939@qq.com> Date: Sat, 14 Jun 2025 19:08:41 +0800 Subject: [PATCH] fix --- oj/dev_settings.py | 10 +++++++++- oj/production_settings.py | 5 ++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/oj/dev_settings.py b/oj/dev_settings.py index 90cf4c9..8d125b8 100644 --- a/oj/dev_settings.py +++ b/oj/dev_settings.py @@ -24,9 +24,17 @@ ALLOWED_HOSTS = [ "127.0.0.1", "10.13.114.114", "150.158.29.156", + "oj.xuyue.cc", "ojtest.xuyue.cc", ] -CSRF_TRUSTED_ORIGINS = ["http://localhost:5173", "https://ojtest.xuyue.cc"] +CSRF_TRUSTED_ORIGINS = [ + "https://oj.xuyue.cc", + "https://ojtest.xuyue.cc", + "http://10.13.114.114:81", + "http://150.158.29.156:8881", + "http://localhost:5173", +] + DATA_DIR = f"{BASE_DIR}/data" diff --git a/oj/production_settings.py b/oj/production_settings.py index 903d365..23c85ea 100644 --- a/oj/production_settings.py +++ b/oj/production_settings.py @@ -24,12 +24,15 @@ ALLOWED_HOSTS = [ "10.13.114.114", "150.158.29.156", "oj.xuyue.cc", + "ojtest.xuyue.cc", ] CSRF_TRUSTED_ORIGINS = [ - "https://oj.xuyue.cc", + "https://oj.xuyue.cc", + "https://ojtest.xuyue.cc", "http://10.13.114.114:81", "http://150.158.29.156:8881", + "http://localhost:5173", ] DATA_DIR = "/data"