feat: disable webhook/websocket by default

This commit is contained in:
guarzo
2025-06-21 16:31:47 -04:00
parent d261c6186b
commit 48ff2f4413
6 changed files with 62 additions and 12 deletions

View File

@@ -0,0 +1,15 @@
defmodule WandererAppWeb.Plugs.CheckWebsocketDisabled do
import Plug.Conn
def init(opts), do: opts
def call(conn, _opts) do
if not WandererApp.Env.websocket_events_enabled?() do
conn
|> send_resp(403, "WebSocket events are disabled")
|> halt()
else
conn
end
end
end