From 9b0f2d572baae4afd19684f80625fe0791b9d6bc Mon Sep 17 00:00:00 2001 From: Dominique Feyer Date: Mon, 17 Sep 2018 12:21:01 +0200 Subject: [PATCH] Return 204 response on options request --- lib/pleroma/web/router.ex | 8 ++++++++ 1 file changed, 8 insertions(+) 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 -- 2.45.2