caboose-cms 0.7.80 → 0.7.81

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
  SHA1:
3
- metadata.gz: 4bd2b52001e41aff8f4b36f2ddb73f81a7413475
4
- data.tar.gz: 5306fa69c2584768d96091eea8d8447c81f0e911
3
+ metadata.gz: bae6f86f96023f55f5a3cc9653d5127c662295e5
4
+ data.tar.gz: c548d5f7eef07f7817483201d6e3ea1fe03e0860
5
5
  SHA512:
6
- metadata.gz: 1d3adcda361933fd03b6947823d55077b4c09f9279f9a0d89995dbd4cee470d85799aee12e5f9b9b0773ca337e74a97b242920272ffedf4d4d9387d77b41a584
7
- data.tar.gz: 589cece85814a30dac022c3dd957003a6b631799cc3982c5b90106f53423ab45d9d02ed7d7a23365b883c82a549089a2170582bf90d4b7efe9a65af0ca88432d
6
+ metadata.gz: d288f567fb500896d1beb68332f12333d955c782dc1b5917087bea691385a8e36cfff6cd4f321ad4a0e9862bc91164f56fcb0d835ec4948fc54db6370d010341
7
+ data.tar.gz: 57ed8bad6421bc2ef0164ca3b16bff5af27f86be454672c72dcaec9298b925a3df87dcd6d878c79e9397f930573628aac2fe1b4324501a4fc027073e32be0734
@@ -83,6 +83,16 @@
83
83
  protocol = request.protocol
84
84
  #protocol = Caboose.plugin_hook('request_protocol', protocol, request)
85
85
 
86
+ # See if we're using cloudflare
87
+ if request.env['HTTP_CF_VISITOR'] && request.env['HTTP_CF_VISITOR'].include?('https')
88
+ protocol = 'https://'
89
+ request.env['REQUEST_URI'] = "https://#{request.env['REQUEST_URI'][7..-1]}" if (request.env['REQUEST_URI'] =~ %r"http://") == 0
90
+ request.env['SERVER_PORT'] = '443' if request.env['SERVER_PORT'] == '80'
91
+ request.env['HTTP_REFERER'] = "https://#{request.env['HTTP_REFERER'][7..-1]}" if (request.env['HTTP_REFERER'] =~ %r"http://") == 0
92
+ request.env['rack.url_scheme'] = 'https'
93
+ request.env['HTTPS'] = 'on'
94
+ end
95
+
86
96
  css = yield(:css)
87
97
  css.gsub!("<link href=\"//", "<link href=\"#{protocol}")
88
98
  css.gsub!("<link href='//" , "<link href='#{protocol}")
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.7.80'
2
+ VERSION = '0.7.81'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboose-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.80
4
+ version: 0.7.81
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry
@@ -1237,7 +1237,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1237
1237
  version: '0'
1238
1238
  requirements: []
1239
1239
  rubyforge_project:
1240
- rubygems_version: 2.5.1
1240
+ rubygems_version: 2.4.5.1
1241
1241
  signing_key:
1242
1242
  specification_version: 4
1243
1243
  summary: CMS built on rails.