diff --git a/lib/elixir_boilerplate_graphql/router.ex b/lib/elixir_boilerplate_graphql/router.ex index be414e16..0e156b66 100644 --- a/lib/elixir_boilerplate_graphql/router.ex +++ b/lib/elixir_boilerplate_graphql/router.ex @@ -5,13 +5,6 @@ defmodule ElixirBoilerplateGraphQL.Router do @moduledoc false use Plug.Router - plug( - Plug.Parsers, - parsers: [:json], - pass: [], - json_decoder: Phoenix.json_library() - ) - plug(:match) plug(:dispatch) diff --git a/lib/elixir_boilerplate_web/endpoint.ex b/lib/elixir_boilerplate_web/endpoint.ex index 2d597929..84b97368 100644 --- a/lib/elixir_boilerplate_web/endpoint.ex +++ b/lib/elixir_boilerplate_web/endpoint.ex @@ -40,6 +40,13 @@ defmodule ElixirBoilerplateWeb.Endpoint do plug(Plug.RequestId) plug(Plug.Telemetry, event_prefix: [:phoenix, :endpoint]) + plug( + Plug.Parsers, + parsers: [:urlencoded, :multipart, :json], + pass: ["*/*"], + json_decoder: Phoenix.json_library() + ) + plug(Sentry.PlugContext, body_scrubber: {ElixirBoilerplate.Errors.Sentry, :scrub_params}, remote_address_reader: {ElixirBoilerplate.Errors.Sentry, :scrubbed_remote_address} diff --git a/lib/elixir_boilerplate_web/router.ex b/lib/elixir_boilerplate_web/router.ex index 06e3affd..71f2062e 100644 --- a/lib/elixir_boilerplate_web/router.ex +++ b/lib/elixir_boilerplate_web/router.ex @@ -4,13 +4,6 @@ defmodule ElixirBoilerplateWeb.Router do import Phoenix.LiveView.Router pipeline :browser do - plug( - Plug.Parsers, - parsers: [:urlencoded, :multipart, :json], - pass: ["*/*"], - json_decoder: Phoenix.json_library() - ) - plug(:accepts, ["html", "json"]) plug(:session)