Allow websockets through multiple hostnames
This commit is contained in:
parent
86d3808e54
commit
dc481bd6aa
|
@ -33,13 +33,15 @@ if config_env() == :prod do
|
||||||
You can generate one by calling: mix phx.gen.secret
|
You can generate one by calling: mix phx.gen.secret
|
||||||
"""
|
"""
|
||||||
|
|
||||||
host = System.get_env("PHX_HOST") || "example.com"
|
host = System.get_env("PHX_HOST") || "localhost"
|
||||||
|
aux_host = System.get_env("PHX_AUX_HOST") || host
|
||||||
port = String.to_integer(System.get_env("PORT") || "4000")
|
port = String.to_integer(System.get_env("PORT") || "4000")
|
||||||
|
|
||||||
config :chronoscope, :dns_cluster_query, System.get_env("DNS_CLUSTER_QUERY")
|
config :chronoscope, :dns_cluster_query, System.get_env("DNS_CLUSTER_QUERY")
|
||||||
|
|
||||||
config :chronoscope, ChronoscopeWeb.Endpoint,
|
config :chronoscope, ChronoscopeWeb.Endpoint,
|
||||||
url: [host: host, port: 443, scheme: "https"],
|
url: [host: host, port: 443, scheme: "https"],
|
||||||
|
check_origin: ["https://" <> host, "https://" <> aux_host],
|
||||||
http: [
|
http: [
|
||||||
# Enable IPv6 and bind on all interfaces.
|
# Enable IPv6 and bind on all interfaces.
|
||||||
# Set it to {0, 0, 0, 0, 0, 0, 0, 1} for local network only access.
|
# Set it to {0, 0, 0, 0, 0, 0, 0, 1} for local network only access.
|
||||||
|
|
Loading…
Reference in New Issue