bowtie-io 1.3.1 → 1.3.2

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
  SHA1:
3
- metadata.gz: 2918254aa6fce6f5149ea73c606ed5922c064c5b
4
- data.tar.gz: 85313755269f1205fbf492ac680a8d8c0420f7a9
3
+ metadata.gz: a0f2ddb9697a9fc29344655df820df45bba2d4ae
4
+ data.tar.gz: 52acc84cb22015097478e94316a7af92eca78fbf
5
5
  SHA512:
6
- metadata.gz: f29e30f48df4a766d36ec6694e03a252af3e86bb681288034088f34d77cf56a0e391d824b62b4fad86c36a58c1c473dc326f2f3e601bd27584cf3d98061c5b07
7
- data.tar.gz: 278ba459838de02fe595f031c714c41225b9e045e4de7e7c88f20f61f2d6353eed31dfb57a15b29ab635a2077987c18f6341c89e9be630851b40cf513fb4a8d7
6
+ metadata.gz: 4b99b828c127ae94d3f76af269c3b8297fcfa47cdf6ebcc9fee840fe438a06416b6d149bb6155c2f2eaa1f63218a6b103c8311675a293f9861d535371e935c3a
7
+ data.tar.gz: 7c7421982af91bd8b19b13c1e619018d198c99af70cf6a33275c4a9ed12f0da96002a904206eda3754280d7ea62674a5dc8d08c61054628c71a73dbb3994926d
@@ -1,3 +1,5 @@
1
+ require 'pry'
2
+
1
3
  module Bowtie::Middleware
2
4
  class Proxy
3
5
  def initialize(*args)
@@ -40,15 +42,15 @@ module Bowtie::Middleware
40
42
  def rewrite_env(env)
41
43
  rack_request = Rack::Request.new(env)
42
44
 
45
+ env['HTTP_X_FORWARDED_HOST'] = rack_request.host_with_port
46
+ env['HTTP_X_FORWARDED_PROTO'] = 'http'
47
+ env['HTTP_X_FORWARDED_SCHEME'] = 'http'
48
+ env['HTTP_X_BOWTIE_CLIENT_VERSION'] = Bowtie::VERSION
49
+
43
50
  env['HTTPS'] = 'on'
44
51
  env['SERVER_PORT'] = 443
45
52
  env['HTTP_HOST'] = Bowtie::Settings['client']['fqdn']
46
53
 
47
- env['HTTP_X_FORWARDED_HOST'] = rack_request.host_with_port
48
- env['HTTP_X_FORWARDED_PROTO'] = rack_request.port.to_s
49
- env['HTTP_X_FORWARDED_SCHEME'] = 'http'
50
- env['HTTP_X_BOWTIE_CLIENT_VERSION'] = Bowtie::VERSION
51
-
52
54
  env
53
55
  end
54
56
 
@@ -62,7 +64,12 @@ module Bowtie::Middleware
62
64
 
63
65
  protected
64
66
  def perform_request(env)
65
- super(env)
67
+ @backend = URI(env['REQUEST_URI'])
68
+ @backend.host = Bowtie::Settings['client']['fqdn']
69
+ @backend.port = 443
70
+ @backend.scheme = 'https'
71
+
72
+ super(env)
66
73
  end
67
74
  end
68
75
  end
@@ -1,3 +1,3 @@
1
1
  module Bowtie
2
- VERSION = '1.3.1'
2
+ VERSION = '1.3.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bowtie-io
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Kassemi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-09 00:00:00.000000000 Z
11
+ date: 2015-12-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll