Skip to content

Commit

Permalink
Add Linux Docker host ip address in ALLOWED_HOSTS #38
Browse files Browse the repository at this point in the history
Signed-off-by: tdruez <[email protected]>
  • Loading branch information
tdruez committed Feb 8, 2024
1 parent 22db54f commit bdcac90
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dejacode/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
SECRET_KEY = env.str("SECRET_KEY")
ALLOWED_HOSTS = env.list(
"ALLOWED_HOSTS",
default=[".localhost", "127.0.0.1", "[::1]", "host.docker.internal"],
default=[".localhost", "127.0.0.1", "[::1]", "host.docker.internal", "172.17.0.1"],
)
CSRF_TRUSTED_ORIGINS = env.list("CSRF_TRUSTED_ORIGINS", default=[])
# SECURITY WARNING: don't run with debug turned on in production
Expand Down
7 changes: 5 additions & 2 deletions docs/dataspace.rst
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,11 @@ Install and configure ScanCode.io
application.

See https://scancodeio.readthedocs.io/en/latest/installation.html#use-alternative-http-ports
Finally, it's essential to specify ``http://host.docker.internal:[port]`` as the
**ScanCode.io URL** instead of using ``http://localhost:[port]``.
Finally, it's essential to specify the following **ScanCode.io URL** instead of
using ``http://localhost:[port]``:

- On **macOS and Windows**: ``http://host.docker.internal:[port]``
- On **Linux**: ``http://172.17.0.1:[port]``

1. Install a ScanCode.io server following instructions at
https://scancodeio.readthedocs.io/en/latest/installation.html
Expand Down

0 comments on commit bdcac90

Please sign in to comment.