From 3d63620cc652c67a4eea9a6387ab62b89984a23d Mon Sep 17 00:00:00 2001 From: Marcin Kulik Date: Tue, 9 May 2017 15:17:18 +0200 Subject: [PATCH] Use SECRET_KEY_BASE from env, only default to fixed string in dev env --- config/config.exs | 2 +- config/dev.exs | 1 + config/prod.exs | 3 +-- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/config.exs b/config/config.exs index 170f2d3..29a86cb 100644 --- a/config/config.exs +++ b/config/config.exs @@ -12,7 +12,7 @@ config :asciinema, # Configures the endpoint config :asciinema, Asciinema.Endpoint, url: [host: "localhost"], - secret_key_base: System.get_env("SECRET_KEY_BASE") || "60BnXnzGGwwiZj91YA9XYKF9BCiM7lQ/1um8VXcWWLSdUp9OcPZV6YnQv7eFTYSY", + secret_key_base: System.get_env("SECRET_KEY_BASE"), render_errors: [view: Asciinema.ErrorView, accepts: ~w(html json)], pubsub: [name: Asciinema.PubSub, adapter: Phoenix.PubSub.PG2] diff --git a/config/dev.exs b/config/dev.exs index 2aa954d..78bd4b6 100644 --- a/config/dev.exs +++ b/config/dev.exs @@ -11,6 +11,7 @@ config :asciinema, Asciinema.Endpoint, debug_errors: true, code_reloader: true, check_origin: false, + secret_key_base: "60BnXnzGGwwiZj91YA9XYKF9BCiM7lQ/1um8VXcWWLSdUp9OcPZV6YnQv7eFTYSY", watchers: [node: ["node_modules/brunch/bin/brunch", "watch", "--stdin", cd: Path.expand("../", __DIR__)]] diff --git a/config/prod.exs b/config/prod.exs index ee670e0..795be7f 100644 --- a/config/prod.exs +++ b/config/prod.exs @@ -14,8 +14,7 @@ use Mix.Config config :asciinema, Asciinema.Endpoint, http: [port: {:system, "PORT"}], url: [scheme: "https", host: "asciinema.org", port: 443], - cache_static_manifest: "priv/static/manifest.json", - secret_key_base: System.get_env("SECRET_KEY_BASE") + cache_static_manifest: "priv/static/manifest.json" # Do not print debug messages in production config :logger, level: :info