Class: Rack::Portarius
- Inherits:
-
Object
- Object
- Rack::Portarius
- Defined in:
- lib/rack/portarius.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ Portarius
constructor
A new instance of Portarius.
Constructor Details
#initialize(app) ⇒ Portarius
Returns a new instance of Portarius.
3 4 5 |
# File 'lib/rack/portarius.rb', line 3 def initialize(app) @app = app end |
Instance Method Details
#call(env) ⇒ Object
7 8 9 10 |
# File 'lib/rack/portarius.rb', line 7 def call(env) return unless env["REMOTE_USER"].nil? || env["REMOTE_USER"] == env["SERVER_NAME"].split(".").first @app.call(env) end |