1
0
mirror of https://git.pleroma.social/sjw/pleroma.git synced 2025-01-28 23:21:22 +01:00

Merge branch 'task-204-on-options-request' into 'develop'

Return 204 response on options request

See merge request pleroma/pleroma!347
This commit is contained in:
kaniini 2018-09-20 23:54:51 +00:00
commit 0fe165165f

View File

@ -400,6 +400,8 @@ defmodule Pleroma.Web.Router do
scope "/", Fallback do
get("/registration/:token", RedirectController, :registration_page)
get("/*path", RedirectController, :redirector)
options("/*path", RedirectController, :empty)
end
end
@ -417,4 +419,10 @@ defmodule Fallback.RedirectController do
def registration_page(conn, params) do
redirector(conn, params)
end
def empty(conn, _params) do
conn
|> put_status(204)
|> text("")
end
end