Skip to content

Commit

Permalink
Fix false 404 in logs when visiting /rack-mini-profiler/requests (#453)
Browse files Browse the repository at this point in the history
  • Loading branch information
OsamaSayegh committed Jul 14, 2020
1 parent 029854f commit 47a8a59
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions lib/mini_profiler/profiler.rb
Expand Up @@ -308,6 +308,15 @@ def call(env)
status, headers, body = @app.call(env)
end
end
elsif path == '/rack-mini-profiler/requests'
blank_page_html = <<~HTML
<html>
<head></head>
<body></body>
</html>
HTML

status, headers, body = [200, { 'Content-Type' => 'text/html' }, [blank_page_html.dup]]
else
status, headers, body = @app.call(env)
end
Expand Down Expand Up @@ -364,16 +373,6 @@ def call(env)
return client_settings.handle_cookie(self.flamegraph(flamegraph))
end

if path == '/rack-mini-profiler/requests'
blank_page_html = <<~HTML
<html>
<head></head>
<body></body>
</html>
HTML

status, headers, body = [200, { 'Content-Type' => 'text/html' }, [blank_page_html.dup]]
end

begin
@storage.save(page_struct)
Expand Down

0 comments on commit 47a8a59

Please sign in to comment.