Skip to content

Instantly share code, notes, and snippets.

@paveltyk
Last active September 11, 2019 21:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paveltyk/bfb25ef81b26519dcdab93cc44ba5065 to your computer and use it in GitHub Desktop.
Save paveltyk/bfb25ef81b26519dcdab93cc44ba5065 to your computer and use it in GitHub Desktop.
# config/prod.exs - url builder options and `force_ssl` behind Heroku proxy
config :healthyskin, HealthyskinWeb.Endpoint,
url: [scheme: "https", host: "example.com", port: 443],
force_ssl: [rewrite_on: [:x_forwarded_proto]]
# config/prod.secret.exs - use secure database connection
config :healthyskin, Healthyskin.Repo,
ssl: true,
url: database_url,
pool_size: String.to_integer(System.get_env("POOL_SIZE") || "10")
# lib/healthyskin_web/endpoint.ex - decrease the timeout for the websocket transport
socket "/socket", HealthyskinWeb.UserSocket,
websocket: [timeout: 45_000],
longpoll: false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment