Skip to content

Commit

Permalink
Adds deployment option for allowed hosts
Browse files Browse the repository at this point in the history
  • Loading branch information
elijahbenizzy committed Apr 30, 2024
1 parent 4c5fe70 commit df13153
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ui/backend/server/server/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,12 @@ def get_from_env(
hostname = socket.gethostname()
local_ip = socket.gethostbyname(hostname)

ALLOWED_HOSTS = ALLOWED_HOSTS + [local_ip] + [hostname]
ALLOWED_HOSTS = (
ALLOWED_HOSTS
+ [local_ip]
+ [hostname]
+ os.environ.get("HAMILTON_ALLOWED_HOSTS", "").split(",")
)

# Application definition

Expand Down

0 comments on commit df13153

Please sign in to comment.