Skip to content

Commit

Permalink
Add APP_URL environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
WongSaang committed Feb 28, 2023
1 parent de9a26a commit 83bb28e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions chatgpt_ui_server/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,12 @@
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = os.getenv('DEBUG', False) == 'True'

ALLOWED_HOSTS = [os.getenv('APP_URL', '*')]
ALLOWED_HOSTS = [os.getenv('APP_DOMAIN', '*')]

CSRF_TRUSTED_ORIGINS=[os.getenv('APP_URL', 'http://localhost:9000')]
CSRF_TRUSTED_ORIGINS=[
'http://' + os.getenv('APP_DOMAIN', 'localhost:9000'),
'https://' + os.getenv('APP_DOMAIN', 'localhost:9000')
]


# Application definition
Expand Down

0 comments on commit 83bb28e

Please sign in to comment.