Skip to content

Commit

Permalink
change request.path_info
Browse files Browse the repository at this point in the history
Otherwise asset files don't load properly
  • Loading branch information
rswaminathan committed Mar 26, 2020
1 parent c9f6128 commit 04bd89e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/coverband/reporters/web.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ def call(env)
@request = Rack::Request.new(env)

return [401, { 'www-authenticate' => 'Basic realm=""' }, ['']] unless check_auth


request.path_info = (request.path_info == "") ? "/" : request.path_info
if request.post?
case request.path_info
when %r{\/clear_view_tracking_file}
Expand Down Expand Up @@ -61,7 +62,7 @@ def call(env)
[200, { 'Content-Type' => 'text/json' }, [debug_data]]
when %r{\/load_file_details}
[200, { 'Content-Type' => 'text/json' }, [load_file_details]]
when %r{\/$|^$}
when %r{\/$}
[200, { 'Content-Type' => 'text/html' }, [index]]
else
[404, { 'Content-Type' => 'text/html' }, ['404 error!']]
Expand Down

0 comments on commit 04bd89e

Please sign in to comment.