File tree Expand file tree Collapse file tree 4 files changed +18
-2
lines changed
Expand file tree Collapse file tree 4 files changed +18
-2
lines changed Original file line number Diff line number Diff line change 1+ use Mix.Config
2+
3+ # Any custom change to be tested in a production like environment must be added here
4+ import_config "prod.exs"
5+
6+ config :elixir_bench , ElixirBenchWeb.Endpoint , origins: [ ~r/ tallysmartins.github.io$/ ]
Original file line number Diff line number Diff line change @@ -28,9 +28,14 @@ defmodule ElixirBenchWeb.Endpoint do
2828 plug Plug.MethodOverride
2929 plug Plug.Head
3030
31+ allowed_origins =
32+ :elixir_bench
33+ |> Application . get_env ( ElixirBenchWeb.Endpoint , [ ] )
34+ |> Keyword . get ( :origins , [ ] )
35+
3136 plug Corsica ,
3237 max_age: 600 ,
33- origins: [ ~r/ localhost:\d +$/ , ~r/ elixirbench.org$/ ] ,
38+ origins: [ ~r/ localhost:\d +$/ , ~r/ elixirbench.org$/ ] ++ allowed_origins ,
3439 allow_headers: ~w( accept content-type origin)
3540
3641 plug ElixirBenchWeb.Router
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ defmodule ElixirBench.Mixfile do
88 elixir: "~> 1.4" ,
99 elixirc_paths: elixirc_paths ( Mix . env ( ) ) ,
1010 compilers: [ :phoenix ] ++ Mix . compilers ( ) ,
11- start_permanent: Mix . env ( ) == :prod ,
11+ start_permanent: Mix . env ( ) == :prod || Mix . env ( ) == :staging ,
1212 aliases: aliases ( ) ,
1313 test_coverage: [ tool: ExCoveralls ] ,
1414 preferred_cli_env: [
Original file line number Diff line number Diff line change @@ -39,6 +39,11 @@ environment :prod do
3939 set cookie: :"?HJ`Ukk;))_nwy4>j>@bPXc6oNSZ==ivI9kF96,63D)S]lkI~tT^NJL]TN@Or5*4"
4040end
4141
42+ environment :staging do
43+ set include_erts: true
44+ set include_src: false
45+ end
46+
4247# You may define one or more releases in this file.
4348# If you have not set a default release, or selected one
4449# when running `mix release`, the first release in the file
You can’t perform that action at this time.
0 commit comments