Skip to content

Commit

Permalink
log the protocol of requests
Browse files Browse the repository at this point in the history
  • Loading branch information
konklone committed Mar 18, 2014
1 parent 9497eac commit bb86221
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions congress.rb
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ def hit!(method_type, format)

extras: extras,

protocol: request.env['HTTP_X_FORWARDED_PROTO'],
user_agent: request.env['HTTP_USER_AGENT'],
app_version: request.env['HTTP_X_APP_VERSION'],
os_version: request.env['HTTP_X_OS_VERSION'],
Expand Down
5 changes: 3 additions & 2 deletions models/hit.rb
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
class Hit
include Mongoid::Document

index created_at: 1
index method: 1
index method_type: 1
index key: 1
index format: 1
index protocol: 1
index user_agent: 1
index app_version: 1
index os_version: 1
index app_channel: 1

index({key: 1, method: 1})
end

0 comments on commit bb86221

Please sign in to comment.