rack-canonical-header 1.0.2 → 1.0.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: 80d44ff0eb421aefb4438e1ae644a4abe2da67fda964fc950416d8a8c822b287
4
- data.tar.gz: '089ce00e708904129a7253925bf3f8136f880957c0169e33d3def6a506e53854'
3
+ metadata.gz: 69f6c28a1f1149c32d82e295a935fed0da3cc9b4adfc058a190603ddee8b1a20
4
+ data.tar.gz: 8ff2da9e45244e2a8aa9b8ded13335e3297976b37b0fe4b777b1acd0e5cb8a5e
5
5
  SHA512:
6
- metadata.gz: 65f8dd47b36444fdee37127743c2645b90f450100b23ea994302074de3f3331b5c50f3f72adc3045fd015d6135f5289407005f00aaf42cac169ba08d9a118296
7
- data.tar.gz: 79119e70eca0b1e594ce50f6ceed36f3f1acaad854523a73a1e0961cc59f434826ead7579c005cd62931b5833e6ef3979080559d37d5d9357895afba7ca1d392
6
+ metadata.gz: 3c3aa296b7d8b1f30dc086f808a2186a6f649bd1c9559308616debb6cdf919d8c894222a65ca0121b7925a11201a35b8dfe42df3aad0f6801257288f275bfe26
7
+ data.tar.gz: a76f3534f0243e81072f00e8b15756a794ce121f680655e5e4f2162bfc06ef76216a2140f60b42354927bc31fee84a9e3841d31b8c9bc2a4545e0e1b2633d51d
@@ -16,7 +16,8 @@ module Canonical
16
16
  end
17
17
 
18
18
  def self.canonical_tag(env, canonical_host)
19
- canonical = "#{env['rack.url_scheme']}://#{canonical_host}#{env['ORIGINAL_FULLPATH']}"
19
+ url_scheme = env['HTTP_X_FORWARDED_PROTO'] || env['rack.url_scheme']
20
+ canonical = "#{url_scheme}://#{canonical_host}#{env['ORIGINAL_FULLPATH']}"
20
21
  "<#{canonical}>; rel=\"canonical\""
21
22
  end
22
23
 
@@ -1,3 +1,3 @@
1
1
  module Canonical
2
- VERSION = '1.0.2'.freeze
2
+ VERSION = '1.0.3'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-canonical-header
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lukas Bischof
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-13 00:00:00.000000000 Z
11
+ date: 2018-04-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler