Skip to content

Cloudflare caches pre-rendered response #194

Open

Description

@chetandev

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?

Activity

  1. acorcutt commented on Mar 20, 2020

    @acorcutt

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions