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 +4 -4
- data/lib/bowtie/middleware/proxy.rb +13 -6
- data/lib/bowtie/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a0f2ddb9697a9fc29344655df820df45bba2d4ae
|
4
|
+
data.tar.gz: 52acc84cb22015097478e94316a7af92eca78fbf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
data/lib/bowtie/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2015-12-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|