moesif_rack 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5ed5bc8ec291e937b9bcb0bcf51718eb50bb52e9
4
- data.tar.gz: b1a58fcde2a75a2e66c98b880d7c11950c19ff38
3
+ metadata.gz: 59bc5bff5591983a5003206528366ee0c34f3aff
4
+ data.tar.gz: 4a0bcc09a7dcad7a050dd69c34f28c4508099d77
5
5
  SHA512:
6
- metadata.gz: 78a04e6c691d1159e4663d40fbc56f1567c762ea850e3e36d6bd67996b361801bc8ab26556a1279d66f32497034d5f0be0ed1287ace7790bf521f901a8a1d5c6
7
- data.tar.gz: 55cc196b84495efa264e3ade047ebe4ada5c1628cfebd1e2d14a7e01d53ea9aa86c87a3a8ae50257b82e26c2b5102104a936132efccfda8319d7ef7893ca5851
6
+ metadata.gz: 8250f76dd528fc69e2969de9e1f1dedff45189ef312b45d5c5421005802c46079211089295a62bf5ccfffc268897f958dbed89813cee571d7f2200b185048d1e
7
+ data.tar.gz: f384af017db404d23ad402e3cc175be9043c4467a2b6e2bbd67ad32ba7cca356434072cbeaf29764a0f8fb24d32b546b16b96a4292d7e6ff41078f6ea45c89ed
data/README.md CHANGED
@@ -51,16 +51,17 @@ within `config/application.rb`
51
51
  #### Order of Middleware Matters
52
52
 
53
53
  Since Moesif Rack is basically a logging middleware, the ordering of middleware matters for accuracy and completeness.
54
- Many middleware are installed by default by rails.
54
+ Many middlewares are installed by default by Rails.
55
55
 
56
- To see the list of the middleware that your system already have, type this into the bash.
56
+ To see the list of middlewares that your system already have, type this into the bash.
57
57
 
58
58
  ```bash
59
59
  bin/rails middleware
60
60
  ```
61
61
 
62
- The best place for MoesifMidleware is on top as possible (so it captures the data closest to the wire).
62
+ The best place for "MoesifRack::MoesifMidleware" is on top as possible (so it captures the data closest to the wire).
63
63
  Typically, right above the default logger of Rails apps, "Rails::Rack::Logger" is a good spot.
64
+ Or if you want to be as close as wire as possible, put it before "ActionDispatch::Static"
64
65
 
65
66
  You should use the following line of code to insert the middleware into the right spot.
66
67
 
@@ -70,6 +71,10 @@ config.middleware.insert_before "Rails::Rack::Logger", "MoesifRack::MoesifMiddle
70
71
 
71
72
  ```
72
73
 
74
+ Please note, if you are using "Rack::Deflater" please make sure that "MoesifRack::MoesifMiddlware"
75
+ is below it, so it can capture uncompressed data.
76
+
77
+
73
78
  ## Configuration options
74
79
 
75
80
  The options is a hash with these possible key value pairs.
@@ -38,7 +38,9 @@ module MoesifRack
38
38
 
39
39
  req_headers = {}
40
40
  complex_copy.select {|k,v| k.start_with? 'HTTP_'}.each do |key, val|
41
- req_headers[key.sub(/^HTTP_/, '')] = val
41
+ new_key = key.sub(/^HTTP_/, '')
42
+ new_key = new_key.sub('_', '-')
43
+ req_headers[new_key] = val
42
44
  end
43
45
 
44
46
  req_body_string = req.body.read
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: moesif_rack
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Moesif, Inc
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-03-27 00:00:00.000000000 Z
12
+ date: 2017-03-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: test-unit