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