Skip to content

Commit

Permalink
chore(explorer): enable CORS for /api endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
JuArce committed Feb 13, 2025
1 parent 6f36329 commit 21bf840
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions explorer/lib/explorer_web/router.ex
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ defmodule ExplorerWeb.Router do
end

pipeline :api do
plug CORSPlug, origin: "*"
plug :accepts, ["json"]
end

Expand Down
3 changes: 2 additions & 1 deletion explorer/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ defmodule Explorer.MixProject do
{:postgrex, ">= 0.0.0"},
{:cachex, "~> 3.6"},
{:mutex, "~> 2.0"},
{:tails, "~> 0.1.5"}
{:tails, "~> 0.1.5"},
{:cors_plug, "~> 3.0"},
]
end

Expand Down

0 comments on commit 21bf840

Please sign in to comment.