active_record_api-rest 2.0.2 → 2.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6aa3055720a100f3890c1e90b171c8a23a0a5dd1ac1b8bf76979719fdda6467f
4
- data.tar.gz: 9df18916760b462d9e8bf9f9bb109783b8bacdeb997b26a0ad92e47a9c6264ca
3
+ metadata.gz: dc0994a817d2635310dec3b30cc63facf74a6d9ddc6cd2596e738e28ecd4eaea
4
+ data.tar.gz: a0cacee14a02df257725c2c5b051427ad913147500524701a6662c13299eb8a2
5
5
  SHA512:
6
- metadata.gz: 38dd89d7ce72bc57c673802c007e7a9b2807188e123fd62c6d235f22b35d6f75d50614efead8f349b2829cc840806d9feec3bdf4be7cdb95cc8a863063bb9d15
7
- data.tar.gz: 3fdc873b9fc81f5672346b1dce20759f510ec8cc63a32c211cf4001ecf33fbc4ed75873a348802936a3bed8ce91d2c74073710319f38674048af1fff0d1bab4b
6
+ metadata.gz: 72232b6d22a4b6910b4c322ae5cc9dcf61835797e07194dfcee7398966edf083862daa4fb3cafc6f72f5e4c8476f8995420fac9e7eeda76258d456da1dd7f404
7
+ data.tar.gz: 473abbe43485294be082c82e01291cbcec17f26e0a49ceca924655aaef5cc6134fa62a7a4a22b0674fbf3da67996b2a8c6a3022b0273e8cc662bf1b8d10c9fab
@@ -38,7 +38,8 @@ module ActiveRecordApi
38
38
  # If the incoming request has this token, it's assumed to be originating from
39
39
  # FME APIs and can be marked authenticated.
40
40
  def authenticated_internally?
41
- token = request.headers['Authorization']&.split(' ')&.last
41
+ header = request.headers['Authorization'] || request.headers['authorization']
42
+ token = header&.split(' ')&.last
42
43
  safe_word = ENV['FME_INTERNAL_API_TOKEN']
43
44
  # Compare the tokens in a time-constant manner, to mitigate
44
45
  # timing attacks.
@@ -2,6 +2,6 @@
2
2
 
3
3
  module ActiveRecordApi
4
4
  module Rest
5
- VERSION = '2.0.2'.freeze
5
+ VERSION = '2.0.3'.freeze
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_record_api-rest
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Full Measure Education
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-04-28 00:00:00.000000000 Z
11
+ date: 2022-06-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler