Skip to content

Manage SSL termination directly from Elixir #1068

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion config/runtime.exs
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,22 @@ if config_env() == :prod do

host = System.get_env("PHX_HOST") || "example.com"
port = String.to_integer(System.get_env("PORT") || "3000")
port_ssl = String.to_integer(System.get_env("PORT_SSL") || "443")

config :arena, :dns_cluster_query, System.get_env("DNS_CLUSTER_QUERY")

config :arena, ArenaWeb.Endpoint,
url: [host: host, port: 443, scheme: "https"],
url: [
scheme: "https",
port: port_ssl,
host: host
],
https: [
port: port_ssl,
cipher_suite: :strong,
keyfile: System.get_env("KEYFILE_PATH"),
certfile: System.get_env("CERTFILE_PATH")
],
http: [
# Enable IPv6 and bind on all interfaces.
# Set it to {0, 0, 0, 0, 0, 0, 0, 1} for local network only access.
Expand Down
Loading