We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 24ca478 commit 997aea7Copy full SHA for 997aea7
octofit-tracker/backend/octofit_tracker/settings.py
@@ -25,7 +25,12 @@
25
# SECURITY WARNING: don't run with debug turned on in production!
26
DEBUG = True
27
28
-ALLOWED_HOSTS = ['*']
+import os
29
+CODESPACE_NAME = os.environ.get('CODESPACE_NAME')
30
+codespace_host = f"{CODESPACE_NAME}-8000.app.github.dev" if CODESPACE_NAME else None
31
+ALLOWED_HOSTS = ['localhost', '127.0.0.1']
32
+if codespace_host:
33
+ ALLOWED_HOSTS.append(codespace_host)
34
35
36
# Application definition
0 commit comments