From 9d91f7499db653506a6e72af432894b754fbb8e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Fri, 14 Feb 2025 02:34:56 +0100 Subject: [PATCH] fix: broken feature in dev mode (#43) 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 be75dd4..03c9468 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 = {