summaryrefslogtreecommitdiff
path: root/lib/lsg_web/router.ex
blob: 773a4c27961f51db4dbacd72e0543269cdf49c75 (plain) (blame)
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
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"]
  end

  scope "/", LSGWeb do
    pipe_through :browser # Use the default browser stack

    get "/embed/widget", PageController, :widget
  end

  scope "/api", LSGWeb do
    pipe_through :api
    get "/icecast.json", PageController, :icecast
  end
end