Skip to content

Commit e2ccc70

Browse files
authored
Add note about CSRF_TRUSTED_ORIGINS (#1319)
With Django 4.0+ setting CSRF_TRUSTED_ORIGINS is necessary. Refer: https://stackoverflow.com/a/70326426/2251364 ScanCodeIO already recommends this setting in the following section: https://scancodeio.readthedocs.io/en/latest/installation.html#run-the-app Signed-off-by: Hritik Vijay <[email protected]>
1 parent 9e0064d commit e2ccc70

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docs/source/installation.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,13 @@ to run on a different port than 8000.
6969
.. note::
7070

7171
To access a dockerized VulnerableCode app from a remote location, the ``ALLOWED_HOSTS``
72-
setting need to be provided in your ``docker.env`` file::
72+
and ``CSRF_TRUSTED_ORIGINS`` setting need to be provided in your ``docker.env`` file::
7373

7474
ALLOWED_HOSTS=.domain.com,127.0.0.1
75+
CSRF_TRUSTED_ORIGINS=https://*.domain.com,http://127.0.0.1
7576

76-
Refer to `Django ALLOWED_HOSTS settings <https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts>`_
77+
Refer to Django `ALLOWED_HOSTS settings <https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts>`_
78+
and `CSRF_TRUSTED_ORIGINS settings <https://docs.djangoproject.com/en/dev/ref/settings/#std-setting-CSRF_TRUSTED_ORIGINS>`_
7779
for more details.
7880

7981
.. warning::

0 commit comments

Comments
 (0)