diff --git a/config/config.exs b/config/config.exs index e6ec3a52..a6e8a40e 100644 --- a/config/config.exs +++ b/config/config.exs @@ -22,6 +22,11 @@ config :logger, :default_formatter, format: "$time $metadata[$level] $message\n", metadata: [:request_id] +# Register protobuf MIME type for agent API +config :mime, :types, %{ + "application/x-protobuf" => ["protobuf"] +} + # Filter sensitive parameters from logs config :phoenix, :filter_parameters, ["password", "snmp_community", "secret", "token", "api_key"] diff --git a/lib/towerops_web/router.ex b/lib/towerops_web/router.ex index 6091da7c..2f7889ed 100644 --- a/lib/towerops_web/router.ex +++ b/lib/towerops_web/router.ex @@ -19,7 +19,7 @@ defmodule ToweropsWeb.Router do end pipeline :agent_api do - plug :accepts, ["json"] + plug :accepts, ["json", "protobuf"] plug ToweropsWeb.Plugs.AgentAuth end