diff --git a/oj/dev_settings.py b/oj/dev_settings.py index 6dba915..895e07a 100644 --- a/oj/dev_settings.py +++ b/oj/dev_settings.py @@ -21,4 +21,6 @@ DEBUG = True ALLOWED_HOSTS = ["*"] +CSRF_TRUSTED_ORIGINS = ["http://localhost:5173", "https://ojtest.xuyue.cc"] + DATA_DIR = f"{BASE_DIR}/data" diff --git a/oj/production_settings.py b/oj/production_settings.py index 467b35b..4be8809 100644 --- a/oj/production_settings.py +++ b/oj/production_settings.py @@ -20,4 +20,6 @@ DEBUG = False ALLOWED_HOSTS = ["*"] +CSRF_TRUSTED_ORIGINS = ["https://oj.xuyue.cc"] + DATA_DIR = "/data"