Skip to content

Commit 50a64c6

Browse files
authored
chore(explorer): enable CORS for /api endpoints (#1800)
1 parent 6f36329 commit 50a64c6

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

explorer/lib/explorer_web/router.ex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ defmodule ExplorerWeb.Router do
2929
end
3030

3131
pipeline :api do
32+
plug CORSPlug, origin: "*"
3233
plug :accepts, ["json"]
3334
end
3435

explorer/mix.exs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ defmodule Explorer.MixProject do
6262
{:postgrex, ">= 0.0.0"},
6363
{:cachex, "~> 3.6"},
6464
{:mutex, "~> 2.0"},
65-
{:tails, "~> 0.1.5"}
65+
{:tails, "~> 0.1.5"},
66+
{:cors_plug, "~> 3.0"},
6667
]
6768
end
6869

0 commit comments

Comments
 (0)