mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-02-01 03:46:44 +01:00
samesite session
This commit is contained in:
parent
20c521e67b
commit
b2724c0de8
2 changed files with 2 additions and 1 deletions
|
@ -40,6 +40,7 @@ defmodule PhilomenaWeb.Endpoint do
|
||||||
# Set :encryption_salt if you would also like to encrypt it.
|
# Set :encryption_salt if you would also like to encrypt it.
|
||||||
plug Plug.Session,
|
plug Plug.Session,
|
||||||
store: :cookie,
|
store: :cookie,
|
||||||
|
extra: "SameSite=Lax",
|
||||||
key: "_philomena_key",
|
key: "_philomena_key",
|
||||||
signing_salt: "signed cookie",
|
signing_salt: "signed cookie",
|
||||||
encryption_salt: "authenticated encrypted cookie"
|
encryption_salt: "authenticated encrypted cookie"
|
||||||
|
|
|
@ -15,7 +15,7 @@ defmodule PhilomenaWeb.ContentSecurityPolicyPlug do
|
||||||
end
|
end
|
||||||
|
|
||||||
def call(conn, [csp_value: csp_value]) do
|
def call(conn, [csp_value: csp_value]) do
|
||||||
Conn.put_resp_header(conn, "Content-Security-Policy", csp_value)
|
Conn.put_resp_header(conn, "content-security-policy", csp_value)
|
||||||
end
|
end
|
||||||
|
|
||||||
defp cdn_uri, do: Application.get_env(:philomena, :cdn_host) |> to_uri()
|
defp cdn_uri, do: Application.get_env(:philomena, :cdn_host) |> to_uri()
|
||||||
|
|
Loading…
Reference in a new issue