PERF: Skip metadata routes for mini_profiler (#20543)

Mini-profiler causes routes to become uncacheable. When using mini_profiler in production, the lack of cache on these routes can have a noticeable impact on performance/rate-limiting.
This commit is contained in:
David Taylor 2023-03-06 11:08:32 +00:00 committed by GitHub
parent 9e49abc0b9
commit 41f933ce89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -53,6 +53,8 @@ if defined?(Rack::MiniProfiler) && defined?(Rack::MiniProfiler::Config)
%r{^/stylesheets/}, %r{^/stylesheets/},
%r{^/favicon/proxied}, %r{^/favicon/proxied},
%r{^/theme-javascripts}, %r{^/theme-javascripts},
%r{^/manifest.webmanifest},
%r{^/opensearch.xml},
] ]
# we DO NOT WANT mini-profiler loading on anything but real desktops and laptops # we DO NOT WANT mini-profiler loading on anything but real desktops and laptops