Class: SpellBook::Proxy
- Inherits:
-
Rack::Proxy
- Object
- Rack::Proxy
- SpellBook::Proxy
- Defined in:
- lib/spellbook/proxy.rb
Instance Method Summary collapse
-
#initialize(port) ⇒ Proxy
constructor
A new instance of Proxy.
- #rewrite_env(env) ⇒ Object
Constructor Details
#initialize(port) ⇒ Proxy
Returns a new instance of Proxy.
5 6 7 |
# File 'lib/spellbook/proxy.rb', line 5 def initialize(port) @port = port end |
Instance Method Details
#rewrite_env(env) ⇒ Object
9 10 11 12 13 14 |
# File 'lib/spellbook/proxy.rb', line 9 def rewrite_env(env) env["SERVER_NAME"] = "localhost" env["SERVER_PORT"] = @port.to_s env["HTTP_HOST"] = "localhost:#{@port}" env end |