From a8f13178cdeebc1ad6161ecc9556fa8abb78de27 Mon Sep 17 00:00:00 2001 From: Zhao Zuohong Date: Wed, 13 Dec 2023 05:07:19 +0000 Subject: [PATCH] =?UTF-8?q?CSRF=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mower_data_collection/settings.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/mower_data_collection/settings.py b/mower_data_collection/settings.py index 473c6ac..8f21c22 100644 --- a/mower_data_collection/settings.py +++ b/mower_data_collection/settings.py @@ -28,10 +28,9 @@ SECRET_KEY = os.environ["SECRET_KEY"] # SECURITY WARNING: don't run with debug turned on in production! DEBUG = False -ALLOWED_HOSTS = [ - "127.0.0.1", - "mower.zhaozuohong.vip", -] +ALLOWED_HOSTS = ["127.0.0.1"] + +CSRF_TRUSTED_ORIGINS = ["https://mower.zhaozuohong.vip"] # Application definition