From f4b399aec2dcf75d95b39d0303df0b616e9322e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Thu, 14 Nov 2024 11:26:12 +0100 Subject: [PATCH] fix: broken feature in dev mode Student notes were simply not working in dev mode because the dev server hostname was not whitelisted in ALLOWED_HOSTS. --- changelog.d/20241114_112459_regis_fix_dev_cors.md | 1 + tutornotes/templates/notes/apps/settings/tutor.py | 1 + 2 files changed, 2 insertions(+) create mode 100644 changelog.d/20241114_112459_regis_fix_dev_cors.md diff --git a/changelog.d/20241114_112459_regis_fix_dev_cors.md b/changelog.d/20241114_112459_regis_fix_dev_cors.md new file mode 100644 index 0000000..b45921c --- /dev/null +++ b/changelog.d/20241114_112459_regis_fix_dev_cors.md @@ -0,0 +1 @@ +- [Bugfix] Fix broken feature in `dev` mode, where the frontend is reporting a CORS error on loading the notes. (by @regisb) diff --git a/tutornotes/templates/notes/apps/settings/tutor.py b/tutornotes/templates/notes/apps/settings/tutor.py index 18e0623..4de5a3e 100644 --- a/tutornotes/templates/notes/apps/settings/tutor.py +++ b/tutornotes/templates/notes/apps/settings/tutor.py @@ -4,6 +4,7 @@ ALLOWED_HOSTS = [ "notes", "{{ NOTES_HOST }}", + "{{ NOTES_HOST }}:8120", ] DATABASES = {