Skip to content

Commit

Permalink
Remove user agent and referer headers from default
Browse files Browse the repository at this point in the history
Too much personal data being sent that's not GDPR compliant.
  • Loading branch information
tombruijn committed May 3, 2018
1 parent 56e6ceb commit fed7a3b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions lib/appsignal/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ class Config
SUGGESTED_REQUEST_HEADERS = [
%w[HTTP_ACCEPT HTTP_ACCEPT_CHARSET HTTP_ACCEPT_ENCODING],
%w[HTTP_ACCEPT_LANGUAGE HTTP_CACHE_CONTROL HTTP_CONNECTION],
%w[CONTENT_LENGTH PATH_INFO HTTP_RANGE HTTP_REFERER],
%w[CONTENT_LENGTH PATH_INFO HTTP_RANGE],
%w[REQUEST_METHOD REQUEST_URI SERVER_NAME SERVER_PORT],
%w[SERVER_PROTOCOL HTTP_USER_AGENT]
%w[SERVER_PROTOCOL]
].freeze

# Mapping of old and deprecated AppSignal configuration keys
Expand Down
9 changes: 4 additions & 5 deletions spec/lib/appsignal/cli/install_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,8 @@
actual.include?(
"export APPSIGNAL_REQUEST_HEADERS=HTTP_ACCEPT,HTTP_ACCEPT_CHARSET," \
"HTTP_ACCEPT_ENCODING,HTTP_ACCEPT_LANGUAGE,HTTP_CACHE_CONTROL," \
"HTTP_CONNECTION,CONTENT_LENGTH,PATH_INFO,HTTP_RANGE,HTTP_REFERER," \
"REQUEST_METHOD,REQUEST_URI,SERVER_NAME,SERVER_PORT,SERVER_PROTOCOL," \
"HTTP_USER_AGENT"
"HTTP_CONNECTION,CONTENT_LENGTH,PATH_INFO,HTTP_RANGE," \
"REQUEST_METHOD,REQUEST_URI,SERVER_NAME,SERVER_PORT,SERVER_PROTOCOL"
)
end
end
Expand All @@ -66,9 +65,9 @@
file_contents =~ /^ request_headers: \[/ &&
file_contents =~ /^ "HTTP_ACCEPT", "HTTP_ACCEPT_CHARSET", "HTTP_ACCEPT_ENCODING",/ &&
file_contents =~ /^ "HTTP_ACCEPT_LANGUAGE", "HTTP_CACHE_CONTROL", "HTTP_CONNECTION",/ &&
file_contents =~ /^ "CONTENT_LENGTH", "PATH_INFO", "HTTP_RANGE", "HTTP_REFERER",/ &&
file_contents =~ /^ "CONTENT_LENGTH", "PATH_INFO", "HTTP_RANGE",/ &&
file_contents =~ /^ "REQUEST_METHOD", "REQUEST_URI", "SERVER_NAME", "SERVER_PORT",/ &&
file_contents =~ /^ "SERVER_PROTOCOL", "HTTP_USER_AGENT"/ &&
file_contents =~ /^ "SERVER_PROTOCOL"/ &&
file_contents =~ /^ \]/
end
end
Expand Down

0 comments on commit fed7a3b

Please sign in to comment.