File size: 443 Bytes
88211d3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
defmodule PlausibleWeb.Plugs.SecureEmbedHeaders do
  @moduledoc """
  Sets secure headers tailored for embedded content.
  """

  import Plug.Conn

  def init(_opts) do
    []
  end

  def call(conn, _opts) do
    merge_resp_headers(
      conn,
      [
        {"referrer-policy", "strict-origin-when-cross-origin"},
        {"x-content-type-options", "nosniff"},
        {"x-permitted-cross-domain-policies", "none"}
      ]
    )
  end
end