1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
defmodule LSGWeb.Router do
use LSGWeb, :router
pipeline :browser do
plug :accepts, ["html"]
#plug :fetch_session
#plug :fetch_flash
#plug :protect_from_forgery
#plug :put_secure_browser_headers
end
pipeline :api do
plug :accepts, ["json", "sse"]
end
scope "/", LSGWeb do
pipe_through :browser
get "/", PageController, :index
get "/embed/widget", PageController, :widget
get "/api", PageController, :api
get "/irc", IrcController, :index
get "/irc/txt", IrcController, :txt
get "/irc/txt/:name", IrcController, :txt
end
scope "/api", LSGWeb do
pipe_through :api
get "/icecast.json", PageController, :icecast
get "/icecast.sse", IcecastSseController, :sse
end
end
|