diff --git a/lib/samly/auth_handler.ex b/lib/samly/auth_handler.ex index 7652402..720d438 100644 --- a/lib/samly/auth_handler.ex +++ b/lib/samly/auth_handler.ex @@ -41,7 +41,7 @@ defmodule Samly.AuthHandler do ] conn - |> put_resp_header("Content-Type", "text/html") + |> put_resp_header("content-type", "text/html") |> send_resp(200, EEx.eval_string(@sso_init_resp_template, opts)) end diff --git a/lib/samly/router.ex b/lib/samly/router.ex index ef66acb..546ccd0 100644 --- a/lib/samly/router.ex +++ b/lib/samly/router.ex @@ -18,11 +18,11 @@ defmodule Samly.Router do conn |> register_before_send(fn connection -> connection - |> put_resp_header("Cache-Control", "no-cache") - |> put_resp_header("Pragma", "no-cache") - |> put_resp_header("X-Frame-Options", "SAMEORIGIN") - |> put_resp_header("X-XSS-Protection", "1; mode=block") - |> put_resp_header("X-Content-Type-Options", "nosniff") + |> put_resp_header("cache-control", "no-cache") + |> put_resp_header("pragma", "no-cache") + |> put_resp_header("x-frame-options", "SAMEORIGIN") + |> put_resp_header("x-xss-protection", "1; mode=block") + |> put_resp_header("x-content-type-options", "nosniff") end) end end diff --git a/lib/samly/router_util.ex b/lib/samly/router_util.ex index 6d0fe85..a127a97 100644 --- a/lib/samly/router_util.ex +++ b/lib/samly/router_util.ex @@ -77,14 +77,14 @@ defmodule Samly.RouterUtil do resp_body = :esaml_binding.encode_http_post(idp_url, signed_xml_payload, relay_state) conn - |> Conn.put_resp_header("Content-Type", "text/html") + |> Conn.put_resp_header("content-type", "text/html") |> Conn.send_resp(200, resp_body) end end def redirect(conn, status_code, dest) do conn - |> Conn.put_resp_header("Location", dest) + |> Conn.put_resp_header("location", dest) |> Conn.send_resp(status_code, "") |> Conn.halt() end diff --git a/lib/samly/sp_handler.ex b/lib/samly/sp_handler.ex index e492c72..f0287e7 100644 --- a/lib/samly/sp_handler.ex +++ b/lib/samly/sp_handler.ex @@ -16,7 +16,7 @@ defmodule Samly.SPHandler do metadata = Helper.sp_metadata(sp) conn - |> put_resp_header("Content-Type", "text/xml") + |> put_resp_header("content-type", "text/xml") |> send_resp(200, metadata) # rescue