From: Dominique Feyer Date: Mon, 17 Sep 2018 10:21:01 +0000 (+0200) Subject: Return 204 response on options request X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=9b0f2d572baae4afd19684f80625fe0791b9d6bc;p=akkoma Return 204 response on options request --- diff --git a/lib/pleroma/web/router.ex b/lib/pleroma/web/router.ex index 856679899..43e301034 100644 --- a/lib/pleroma/web/router.ex +++ b/lib/pleroma/web/router.ex @@ -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