senthor_rails 1.0.0 → 1.1.0

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: c17882a5becfec10b1da9566cb6986acfa956b725cd5e0e6a4d1d7d540efbd57
4
- data.tar.gz: a654e11764da1434a21168b0bea121f4c13fd6932016af46b0393d995875b941
3
+ metadata.gz: 72949fb011639389349af1ee48b2efb477c196cb1ccf759a686df3add5375cd3
4
+ data.tar.gz: f28f441a5023edbda0951f7d5eb6f2f8290ebf76182b00caaa3cc8578b25d391
5
5
  SHA512:
6
- metadata.gz: d7765d120b15fb8924e855cbdac5df24ad62675f8f13dcc3615e6db0d916d9d786e736dc5f4ccc740b28e699f7eff211f75b5ecd8a04fef923e95f78da16cd2c
7
- data.tar.gz: 200f3cdf3b39492d8daeaf44029fc24cd7ef03718e2590b31cce0f11c8483810c134faf6015219dae5757bf0f6fd706c4e98ec59c732f524d6003d1eec329961
6
+ metadata.gz: 4e9851d50ec89342657036d6d04f96ffb3fad3ce58ca5f93fcd71879c15efad980fcf4a038a1acef0ffb802b827dcbedb1929b5b0120f71b4bcec0a7c10e0ddc
7
+ data.tar.gz: be14ef902ba19642a84978921673fbfc5a239303b699efec340b8508eb234db1961c33e9d0359420b3e250077280986537c1cb4116c9073b5769efa51c014527
@@ -72,11 +72,15 @@ module Senthor
72
72
 
73
73
  response = http.request(request)
74
74
 
75
+ rack_headers = { 'Content-Type' => response['Content-Type'] || 'text/plain' }
76
+ response.each_header do |key, value|
77
+ rack_headers[key] = value if key.downcase.start_with?('crawler-')
78
+ end
75
79
  # Handle 402 response like in JS
76
80
  if response.code.to_i == 402
77
81
  return [
78
82
  402,
79
- { 'Content-Type' => response['Content-Type'] || 'text/plain' },
83
+ rack_headers,
80
84
  [response.body]
81
85
  ]
82
86
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SenthorRails
4
- VERSION = "1.0.0"
4
+ VERSION = "1.1.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: senthor_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Senthor
@@ -23,7 +23,6 @@ files:
23
23
  - lib/senthor_rails.rb
24
24
  - lib/senthor_rails/middleware.rb
25
25
  - lib/senthor_rails/version.rb
26
- - senthor_rails-0.1.0.gem
27
26
  - sig/senthor_rails.rbs
28
27
  homepage: https://www.senthor.io
29
28
  licenses:
Binary file