Skip to content

Commit 44755af

Browse files
Merge pull request #129 from maykinmedia/feature/remove-default
✅ # Set `SITE_DOMAIN` default to an empty string
2 parents f6aac9e + a0290b8 commit 44755af

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

open_api_framework/conf/base.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@
2929
#
3030
# Core Django settings
3131
#
32+
SITE_ID = config(
33+
"SITE_ID",
34+
default=1,
35+
help_text="The database ID of the site object. You usually won't have to touch this.",
36+
)
3237

3338
# SECURITY WARNING: keep the secret key used in production secret!
3439
SECRET_KEY = config(
@@ -799,7 +804,7 @@
799804
)
800805
SITE_DOMAIN = config(
801806
"SITE_DOMAIN",
802-
default="example.com",
807+
default="",
803808
help_text=("Defines the primary domain where the application is hosted."),
804809
)
805810

tests/test_generate_envvar_docs.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
Optional
7575
--------
7676
77+
* ``SITE_ID``: The database ID of the site object. You usually won't have to touch this. Defaults to: ``1``.
7778
* ``DEBUG``: Only set this to ``True`` on a local development environment. Various other security settings are derived from this setting!. Defaults to: ``False``.
7879
* ``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``.
7980
* ``IS_HTTPS``: Used to construct absolute URLs and controls a variety of security settings. Defaults to the inverse of ``DEBUG``.
@@ -96,7 +97,7 @@
9697
* ``NUM_PROXIES``: the number of reverse proxies in front of the application, as an integer. This is used to determine the actual client IP adres. On Kubernetes with an ingress you typically want to set this to 2. Defaults to: ``1``.
9798
* ``CSRF_TRUSTED_ORIGINS``: A list of trusted origins for unsafe requests (e.g. POST). Defaults to: ``[]``.
9899
* ``NOTIFICATIONS_DISABLED``: indicates whether or not notifications should be sent to the Notificaties API for operations on the API endpoints. Defaults to ``True`` for the ``dev`` environment, otherwise defaults to ``False``.
99-
* ``SITE_DOMAIN``: Defines the primary domain where the application is hosted. Defaults to: ``example.com``.
100+
* ``SITE_DOMAIN``: Defines the primary domain where the application is hosted. Defaults to: ``(empty string)``.
100101
* ``SENTRY_DSN``: URL of the sentry project to send error reports to. Default empty, i.e. -> no monitoring set up. Highly recommended to configure this.
101102
* ``DISABLE_2FA``: Whether or not two factor authentication should be disabled. Defaults to: ``False``.
102103
* ``LOG_OUTGOING_REQUESTS_EMIT_BODY``: Whether or not outgoing request bodies should be logged. Defaults to: ``True``.

0 commit comments

Comments
 (0)