Skip to content

Commit 059be17

Browse files
authored
Do not record cookies automatically (#20)
Cookies may contain sensible information and should not be recorded automatically.
1 parent 5819ef1 commit 059be17

File tree

1 file changed

+1
-1
lines changed
  • lib/error_tracker/integrations

1 file changed

+1
-1
lines changed

lib/error_tracker/integrations/plug.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ defmodule ErrorTracker.Integrations.Plug do
9090
"request.query" => conn.query_string,
9191
"request.method" => conn.method,
9292
"request.ip" => remote_ip(conn),
93-
"request.headers" => Map.new(conn.req_headers),
93+
"request.headers" => conn.req_headers |> Map.new() |> Map.drop(["cookie"]),
9494
# Depending on the error source, the request params may have not been fetched yet
9595
"request.params" => unless(is_struct(conn.params, Plug.Conn.Unfetched), do: conn.params)
9696
}

0 commit comments

Comments
 (0)