aboutsummaryrefslogtreecommitdiff
path: root/web/router.ex
diff options
context:
space:
mode:
authorneodarz <neodarz@neodarz.net>2017-02-06 16:52:00 +0100
committerneodarz <neodarz@neodarz.net>2017-02-06 16:52:00 +0100
commit120bf89930ce7e136ba0b0499bce7b0f8b95f296 (patch)
treed86d7320d75f33fac32b897277296f5a6c80e645 /web/router.ex
parent663d70f2d9d917ac5f89faebc289a664b7dcc22a (diff)
downloadthe_transcriber_backend-120bf89930ce7e136ba0b0499bce7b0f8b95f296.tar.xz
the_transcriber_backend-120bf89930ce7e136ba0b0499bce7b0f8b95f296.zip
Add a not secure function for upload files with curl
Diffstat (limited to 'web/router.ex')
-rw-r--r--web/router.ex13
1 files changed, 9 insertions, 4 deletions
diff --git a/web/router.ex b/web/router.ex
index 453b1f7..0fd11d5 100644
--- a/web/router.ex
+++ b/web/router.ex
@@ -5,7 +5,7 @@ defmodule TheTranscriberBackend.Router do
plug :accepts, ["html"]
plug :fetch_session
plug :fetch_flash
- plug :protect_from_forgery
+ #plug :protect_from_forgery
plug :put_secure_browser_headers
end
@@ -18,10 +18,15 @@ defmodule TheTranscriberBackend.Router do
get "/", PageController, :index
resources "/audio_file", AudioFileController
+
+ post "/", PageController, :index
+ resources "/audio_file", AudioFileController
end
# Other scopes may use custom stacks.
- # scope "/api", TheTranscriberBackend do
- # pipe_through :api
- # end
+ scope "/api", TheTranscriberBackend do
+ pipe_through :api
+
+ resources "/audio_file", AudioFileAPIController
+ end
end