Class: Redisse::RedirectEndpoint
- Inherits:
-
Object
- Object
- Redisse::RedirectEndpoint
- Defined in:
- lib/redisse/redirect_endpoint.rb
Overview
Rack app that redirects to the Redisse server via X-Accel-Redirect.
Instance Method Summary (collapse)
- - (Object) call(env)
-
- (RedirectEndpoint) initialize(redisse)
constructor
A new instance of RedirectEndpoint.
Constructor Details
- (RedirectEndpoint) initialize(redisse)
Returns a new instance of RedirectEndpoint
8 9 10 11 |
# File 'lib/redisse/redirect_endpoint.rb', line 8 def initialize(redisse) @redisse = redisse self.base_url = redisse.nginx_internal_url end |
Instance Method Details
- (Object) call(env)
13 14 15 16 17 |
# File 'lib/redisse/redirect_endpoint.rb', line 13 def call(env) response = Rack::Response.new response['X-Accel-Redirect'] = redirect_url(env) response end |