Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not check blacklist/whitelist if is_requesting_prerendered_page is false #42

Conversation

rporrasluc
Copy link

The purpose of this PR is to improve the performance of something as critical as a middleware, which is executed in every request.

According to the code, the blacklist and whitelist options are checked even if is_requesting_prerendered_page variable is false. This does not make sense, since once this variable is false after the initial checks (no escaped_fragment, no crawler, no buffer agent) we know that the prerendered page will not be used.

@rporrasluc rporrasluc mentioned this pull request Nov 21, 2018
@seven1m
Copy link

seven1m commented May 26, 2021

This is great. I am not affiliated with this project, but we have merged your PR (along with some others) into our own fork here: https://github.com/ministrycentered/prerender_rails

@rporrasluc rporrasluc closed this Dec 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants