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

filter caching feature on host or domain ? #40

Open
Zeboch opened this issue Sep 12, 2018 · 3 comments
Open

filter caching feature on host or domain ? #40

Zeboch opened this issue Sep 12, 2018 · 3 comments

Comments

@Zeboch
Copy link

Zeboch commented Sep 12, 2018

Is there any way to filter eligible pages for caching on host or domain ? Except misunderstanding, today, we can only white list or black list on path …

I can see something like this on the Node middleware with host option.

@thoop
Copy link
Contributor

thoop commented Sep 25, 2018

Not currently, but we should probably add the host parameter here too. In the prerender-node middleware, the host parameter doesn't do any filtering but sets the host to a hard coded value. If you want to actually do any filtering, you could set that up before the prerender.io middleware runs. For example, you might just have some code that checks the incoming Host header and returns a 404 for Host values that don't match the list of your own hosts.

@rporrasluc
Copy link

Hello @Zeboch, I think your requirement could be covered by this feature, I just created a pull request for it:

#45

I introduced the skip_prerender option that will give you flexibility to be based in the domain or any other condition.

@Zeboch Zeboch closed this as completed Nov 25, 2019
@Zeboch
Copy link
Author

Zeboch commented Mar 11, 2020

Re-opening since PR was not accepted.

@thoop FYI, I'm using the rails middleware and I would prefer to specify host or domain restriction directly in the middleware configuration (relatively to my env). Anything new from your side?

@Zeboch Zeboch reopened this Mar 11, 2020
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

No branches or pull requests

3 participants