Skip to content

Commit 4be8bbd

Browse files
authored
Merge pull request #120 from maykinmedia/feature/add-site-domain-var
✅ Add SITE_DOMAIN env var
2 parents d9caaed + 82caea4 commit 4be8bbd

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

open_api_framework/conf/base.py

+6
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@
3535
help_text="The database ID of the site object. You usually won't have to touch this.",
3636
)
3737

38+
SITE_DOMAIN = config(
39+
"SITE_DOMAIN",
40+
default="example.com",
41+
help_text=("Defines the primary domain where the application is hosted."),
42+
)
43+
3844
# SECURITY WARNING: keep the secret key used in production secret!
3945
SECRET_KEY = config(
4046
"SECRET_KEY",

tests/test_generate_envvar_docs.py

+1
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
--------
7676
7777
* ``SITE_ID``: The database ID of the site object. You usually won't have to touch this. Defaults to: ``1``.
78+
* ``SITE_DOMAIN``: Defines the primary domain where the application is hosted. Defaults to: ``example.com``.
7879
* ``DEBUG``: Only set this to ``True`` on a local development environment. Various other security settings are derived from this setting!. Defaults to: ``False``.
7980
* ``USE_X_FORWARDED_HOST``: whether to grab the domain/host from the X-Forwarded-Host header or not. This header is typically set by reverse proxies (such as nginx, traefik, Apache...). Note: this is a header that can be spoofed and you need to ensure you control it before enabling this. Defaults to: ``False``.
8081
* ``IS_HTTPS``: Used to construct absolute URLs and controls a variety of security settings. Defaults to the inverse of ``DEBUG``.

0 commit comments

Comments
 (0)