Skip to content

Commit

Permalink
v2 flag
Browse files Browse the repository at this point in the history
  • Loading branch information
BuildTools committed Aug 4, 2023
1 parent 3775783 commit d1a3369
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions server/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = os.environ.get("OPEN5E_DEBUG", "") != "False"

# A flag that is True when not production to disallow /v2 api endpoint in production.
V2_ENABLED = os.environ.get("SERVER_NAME", "") != "api.open5e.com"

# Added as part of the migration from django 2 to django 3.
# Not likely to apply in the short term. https://docs.djangoproject.com/en/4.1/ref/settings/#default-auto-field
DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"
Expand Down

0 comments on commit d1a3369

Please sign in to comment.