From 077b224a2a4ef3f4c70a545d5d5d444ecdf9ee65 Mon Sep 17 00:00:00 2001 From: yuetsh <517252939@qq.com> Date: Sat, 14 Jun 2025 19:00:37 +0800 Subject: [PATCH] fix --- oj/dev_settings.py | 8 +++++++- oj/production_settings.py | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/oj/dev_settings.py b/oj/dev_settings.py index 895e07a..90cf4c9 100644 --- a/oj/dev_settings.py +++ b/oj/dev_settings.py @@ -19,7 +19,13 @@ REDIS_CONF = { DEBUG = True -ALLOWED_HOSTS = ["*"] +ALLOWED_HOSTS = [ + "localhost", + "127.0.0.1", + "10.13.114.114", + "150.158.29.156", + "ojtest.xuyue.cc", +] CSRF_TRUSTED_ORIGINS = ["http://localhost:5173", "https://ojtest.xuyue.cc"] diff --git a/oj/production_settings.py b/oj/production_settings.py index 80996d4..903d365 100644 --- a/oj/production_settings.py +++ b/oj/production_settings.py @@ -18,7 +18,13 @@ REDIS_CONF = { DEBUG = False -ALLOWED_HOSTS = ["*"] +ALLOWED_HOSTS = [ + "localhost", + "127.0.0.1", + "10.13.114.114", + "150.158.29.156", + "oj.xuyue.cc", +] CSRF_TRUSTED_ORIGINS = [ "https://oj.xuyue.cc",