Class: Bowtie::Middleware::Proxy
- Inherits:
-
Object
- Object
- Bowtie::Middleware::Proxy
- Defined in:
- lib/bowtie/middleware/proxy.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(*args) ⇒ Proxy
constructor
A new instance of Proxy.
Constructor Details
Instance Method Details
#call(env) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/bowtie/middleware/proxy.rb', line 8 def call(env) status, headers, body = @platform.call(env) if status.to_i == 305 env[:proxy_addon_headers] = JSON.load(headers['X-Bowtie-Client-Proxy-Headers'].first) env[:proxy_location] = headers['Location'].first @backend.call(env) else [status, headers, body] end end |