mirror of
https://github.com/Retropex/bitfeed.git
synced 2025-05-12 19:20:46 +02:00
19 lines
362 B
Elixir
19 lines
362 B
Elixir
defmodule BitcoinStream.Router do
|
|
use Plug.Router
|
|
|
|
plug Corsica, origins: "*", allow_headers: :all
|
|
plug Plug.Static,
|
|
at: "/",
|
|
from: :bitcoin_stream
|
|
plug :match
|
|
plug Plug.Parsers,
|
|
parsers: [:json],
|
|
pass: ["application/json", "text/plain"],
|
|
json_decoder: Jason
|
|
plug :dispatch
|
|
|
|
match _ do
|
|
send_resp(conn, 404, "404")
|
|
end
|
|
end
|