Skip to content

Commit

Permalink
Fix 403 response for cast requests
Browse files Browse the repository at this point in the history
  • Loading branch information
ku1ik committed May 18, 2024
1 parent cf7aeda commit 8202153
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
10 changes: 9 additions & 1 deletion config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,15 @@ config :logger,
config :phoenix, :json_library, Jason

config :phoenix, :template_engines, md: PhoenixMarkdown.Engine
config :phoenix_template, :format_encoders, svg: Phoenix.HTML.Engine, xml: Phoenix.HTML.Engine

config :phoenix_template, :format_encoders,
cast: Jason,
svg: Phoenix.HTML.Engine,
xml: Phoenix.HTML.Engine

config :mime, :types, %{
"application/x-asciicast" => ["cast"]
}

config :sentry,
dsn: "https://public:secret@sentry.io/1",
Expand Down
1 change: 1 addition & 0 deletions lib/asciinema_web/controllers/fallback_controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ defmodule AsciinemaWeb.FallbackController do
|> put_view(
html: AsciinemaWeb.ErrorHTML,
json: AsciinemaWeb.ErrorJSON,
cast: AsciinemaWeb.ErrorJSON,
txt: AsciinemaWeb.ErrorTEXT,
svg: AsciinemaWeb.ErrorTEXT,
xml: AsciinemaWeb.ErrorTEXT
Expand Down

0 comments on commit 8202153

Please sign in to comment.