You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Note on `CSRF_TRUSTED_ORIGINS`
On first run (or any startup where `REGENERATE_SETTINGS=true`) we will set `CSRF_TRUSTED_ORIGINS` to match the value of `SITE_ROOT`. If you need different/additional origins, you will need to edit `/config/local_settings.py` and add them yourself. Note that setting `REGENERATE_SETTINGS=true` will overwrite any changes on startup.
Expected Behavior
However, the behaviour has changed since this commit bd0cb9e
Please update the readme docs with an example that CSRF_TRUSTED_ORIGINS has to be manually set, and that it takes in only a str and not a list (different behaviour from django's CSRF_TRUSTED_ORIGINS)
SyntaxError: invalid syntax. Perhaps you forgot a comma?
Traceback (most recent call last):
File "/app/healthchecks/manage.py", line 17, in<module>
raise e
File "/app/healthchecks/manage.py", line 13, in<module>
execute_from_command_line(sys.argv)
File "/lsiopy/lib/python3.11/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
utility.execute()
File "/lsiopy/lib/python3.11/site-packages/django/core/management/__init__.py", line 382, in execute
settings.INSTALLED_APPS
File "/lsiopy/lib/python3.11/site-packages/django/conf/__init__.py", line 102, in __getattr__
self._setup(name)
File "/lsiopy/lib/python3.11/site-packages/django/conf/__init__.py", line 89, in _setup
self._wrapped = Settings(settings_module)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/django/conf/__init__.py", line 217, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/app/healthchecks/hc/settings.py", line 338, in<module>
from .local_settings import *# noqa: F403
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/healthchecks/hc/local_settings.py", line 9
CSRF_TRUSTED_ORIGINS = ["["https://my-healthchecks-app.abc.com"]"
The text was updated successfully, but these errors were encountered:
The readme isn't wrong, but the init logic was. The linked PR should fix the logic and also updates the readme to clarify setting the CSRF_TRUSTED_ORIGINS as it's not part of the Healthchecks docs.
Is there an existing issue for this?
Current Behavior
From the README
Expected Behavior
However, the behaviour has changed since this commit bd0cb9e
Please update the readme docs with an example that
CSRF_TRUSTED_ORIGINS
has to be manually set, and that it takes in only a str and not a list (different behaviour from django's CSRF_TRUSTED_ORIGINS)Steps To Reproduce
Works
Does not work
Environment
No response
CPU architecture
x86-64
Docker creation
Container logs
The text was updated successfully, but these errors were encountered: