File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,10 +15,12 @@ def call(env)
1515 request = Rack ::Request . new ( env )
1616
1717 if on_api_subdomain? ( request )
18- redirect_to_gui ( request ) unless is_api_call? ( request )
18+ return redirect_to_gui ( request ) unless is_api_call? ( request )
1919 else
20- redirect_to_api ( request ) if is_api_call? ( request )
20+ return redirect_to_api ( request ) if is_api_call? ( request )
2121 end
22+
23+ @app . call ( env )
2224 end
2325
2426 def redirect_to_api ( request )
@@ -30,7 +32,7 @@ def redirect_to_api(request)
3032 uri . host = @api_domain
3133 uri . path = new_path
3234
33- return [
35+ [
3436 301 ,
3537 { 'Location' => uri . to_s , 'Content-Type' => 'text/html' } ,
3638 [ 'Moved Permanently' ]
@@ -45,7 +47,7 @@ def redirect_to_gui(request)
4547 uri . host = @gui_domain
4648 uri . path = new_path
4749
48- return [
50+ [
4951 301 ,
5052 { 'Location' => uri . to_s , 'Content-Type' => 'text/html' } ,
5153 [ 'Moved Permanently' ]
You can’t perform that action at this time.
0 commit comments