mn_middleware_gem 1.4.2 → 1.4.3

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
  SHA256:
3
- metadata.gz: 87d60e1b55c6fa6ad1b5fdb1816630b669ed505e285dec14b9bb76ea5be79d93
4
- data.tar.gz: 5af8629bb1fb4f0cd7b3ccab3acc5c35c622180d5f1bdee2273ddfc672d3a0f3
3
+ metadata.gz: 21ede2ece552c433714e924c2cf099c231bc8c0850007c839e780fe3cae804c9
4
+ data.tar.gz: 536f011643aff7e03a7ab7a7973fdee3f65d528f84810837f6a891c7af225707
5
5
  SHA512:
6
- metadata.gz: dfdd0ce641287c9b681a2c333a6085ec9c45b07d5c31248a9e2413d8b2cc77d473ee86136c9018d3ff7b9a1f56004ded08a5ee04bf074e6907974a0cf5939e5c
7
- data.tar.gz: 0f2b0b288e879ef4d22010a14089777ce4b49bf57884b50efba0c4077157e6ab7dd91233c6d9e0856c22cf39b12cdeff675be18d28646761cf24453892c2a6dc
6
+ metadata.gz: 40cd1a266c89c7575ece1fe93d00473d4dde3624fe72bbdcc496073b49e46ff83a8bc7c9bd821c654568ed0fbdfc582d679c59fd8938362f7760bb0701c35ce5
7
+ data.tar.gz: 258af17c52c994fd163fc8d830ce7fd1d79e9174c6320453d1e1d65f756d254b4e17869cf683e5a03807262f82a2fa94fbd56550a620def7eecb9f0843cc47cf
@@ -1,3 +1,5 @@
1
+ require 'request_store'
2
+
1
3
  module MnMiddleware
2
4
  class RemoteIpLogger
3
5
  def initialize(app)
@@ -8,6 +10,7 @@ module MnMiddleware
8
10
  if env["HTTP_X_FORWARDED_FOR"]
9
11
  remote_ip = env["HTTP_X_FORWARDED_FOR"].split(",")[0]
10
12
  env['REMOTE_ADDR'] = env["action_dispatch.remote_ip"] = env["HTTP_X_FORWARDED_FOR"] = remote_ip
13
+ RequestStore.store[:remote_ip] = remote_ip
11
14
  @app.call(env)
12
15
  else
13
16
  @app.call(env)
@@ -1,3 +1,3 @@
1
1
  module MnMiddlewareGem
2
- VERSION = "1.4.2"
2
+ VERSION = "1.4.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mn_middleware_gem
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.2
4
+ version: 1.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shamim Mirzai
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-29 00:00:00.000000000 Z
11
+ date: 2019-04-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: request_store
@@ -94,7 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
94
94
  - !ruby/object:Gem::Version
95
95
  version: '0'
96
96
  requirements: []
97
- rubygems_version: 3.0.1
97
+ rubygems_version: 3.0.3
98
98
  signing_key:
99
99
  specification_version: 4
100
100
  summary: Mumsnet middleware gem for microservices