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
28
28
plug Plug.MethodOverride
29
29
plug Plug.Head
30
30
31
+ allowed_origins =
32
+ :elixir_bench
33
+ |> Application . get_env ( ElixirBenchWeb.Endpoint , [ ] )
34
+ |> Keyword . get ( :origins , [ ] )
35
+
31
36
plug Corsica ,
32
37
max_age: 600 ,
33
- origins: [ ~r/ localhost:\d +$/ , ~r/ elixirbench.org$/ ] ,
38
+ origins: [ ~r/ localhost:\d +$/ , ~r/ elixirbench.org$/ ] ++ allowed_origins ,
34
39
allow_headers: ~w( accept content-type origin)
35
40
36
41
plug ElixirBenchWeb.Router
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ defmodule ElixirBench.Mixfile do
8
8
elixir: "~> 1.4" ,
9
9
elixirc_paths: elixirc_paths ( Mix . env ( ) ) ,
10
10
compilers: [ :phoenix ] ++ Mix . compilers ( ) ,
11
- start_permanent: Mix . env ( ) == :prod ,
11
+ start_permanent: Mix . env ( ) == :prod || Mix . env ( ) == :staging ,
12
12
aliases: aliases ( ) ,
13
13
test_coverage: [ tool: ExCoveralls ] ,
14
14
preferred_cli_env: [
Original file line number Diff line number Diff line change @@ -39,6 +39,11 @@ environment :prod do
39
39
set cookie: :"?HJ`Ukk;))_nwy4>j>@bPXc6oNSZ==ivI9kF96,63D)S]lkI~tT^NJL]TN@Or5*4"
40
40
end
41
41
42
+ environment :staging do
43
+ set include_erts: true
44
+ set include_src: false
45
+ end
46
+
42
47
# You may define one or more releases in this file.
43
48
# If you have not set a default release, or selected one
44
49
# when running `mix release`, the first release in the file
You can’t perform that action at this time.
0 commit comments