Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions lib/tidewave.ex
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,14 @@ defmodule Tidewave do
conn
|> validate!()
|> Plug.Conn.register_before_send(fn conn ->
conn
|> maybe_rewrite_csp()
|> Plug.Conn.delete_resp_header("x-frame-options")
try do
conn
|> maybe_rewrite_csp()
|> Plug.Conn.delete_resp_header("x-frame-options")
rescue
Plug.Conn.AlreadySentError ->
conn
end
end)
end

Expand Down
Loading