Skip to content

Commit

Permalink
Fixed server issue with ALLOWED_HOSTS and incorrect static IP
Browse files Browse the repository at this point in the history
  • Loading branch information
jaw12346 committed Oct 25, 2023
1 parent 10e478d commit 67095c5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ACMAS/.env
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# DO NOT UPLOAD ANY CHANGES TO GITHUB!
DATABASE=postgres
DEBUG=1
DJANGO_ALLOWED_HOSTS='localhost 127.0.0.1 [::1] 52.60.213.127 www.acmas.systems acmas.systems'
DJANGO_ALLOWED_HOSTS='localhost 127.0.0.1 [::1] 52.55.52.58 www.acmas.systems acmas.systems'
DJANGO_EMAIL=[email protected]
DJANGO_PASS=password
DJANGO_USER=acmas_admin
Expand Down
2 changes: 1 addition & 1 deletion ACMAS/app/ACMAS/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

# 'DJANGO_ALLOWED_HOSTS' should be a single string of hosts with a space between each.
# For example: 'DJANGO_ALLOWED_HOSTS=localhost 127.0.0.1 [::1]'
ALLOWED_HOSTS = os.environ.get("DJANGO_ALLOWED_HOSTS", default="").split(" ")
ALLOWED_HOSTS = os.environ.get("DJANGO_ALLOWED_HOSTS", default="").strip("'").split(" ")

# Application definition

Expand Down

0 comments on commit 67095c5

Please sign in to comment.