summaryrefslogtreecommitdiff
path: root/lib/lsg_web/router.ex
diff options
context:
space:
mode:
authorhref <href@random.sh>2018-01-31 20:36:42 +0100
committerhref <href@random.sh>2018-01-31 20:36:42 +0100
commitfcb2a082346054108f3f16cffe968450cf961976 (patch)
tree8e7d2eb9eeebf854e62e08c29b147f34dfeb1881 /lib/lsg_web/router.ex
import
Diffstat (limited to '')
-rw-r--r--lib/lsg_web/router.ex26
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/lsg_web/router.ex b/lib/lsg_web/router.ex
new file mode 100644
index 0000000..773a4c2
--- /dev/null
+++ b/lib/lsg_web/router.ex
@@ -0,0 +1,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