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

Cloudflare caches pre-rendered response #194

Open
chetandev opened this issue Mar 16, 2020 · 1 comment
Open

Cloudflare caches pre-rendered response #194

chetandev opened this issue Mar 16, 2020 · 1 comment

Comments

@chetandev
Copy link

We are using Cloudflare as CDN
when we use pre-rendered.io with headers "cache-control:no-cache"
, then first response comes fine, but the second response from pre-rendered get cached in Cloudflare
I don't want to cache the pre-rendered.io response to Cloudflare
can somebody help me how do I configure prerender.io with Cloudflare?

@acorcutt
Copy link

I just had the same issue, setting the 'host' to the one behind the cloudflare proxy to bypass the cache worked for me:
app.use(require('prerender-node').set('host', 'myfirebaseapp.web.app'));

You can use 'beforeRender' if you then need to change the cache header for the prerender requests.

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

2 participants