PHP/FPDF keep loading behind cloudflare

,

Hi, i have a problem with Cloudflare.
My web app uses FPDF (PHP) to generate PDF files, but when i activate clouflare the PDF generates only once, when i reload the pdf it does not load anymore.

The solution i found now is to disable Cloudflare and use it as “DNS Only” mode, but i want to use Cloudflare in my site, any idea why is tis happening?

PDF is normally a static file that doesn’t change (if you’re using the same filename).
Use a Page Rule to bypass caching for PDF files:

Match: example.com/*.pdf (this should match all paths that have a file that ends with pdf)
Set: Cache Level (Bypass)

https://support.cloudflare.com/hc/en-us/articles/200172516-Which-file-extensions-does-Cloudflare-cache-for-static-content-

1 Like

Hi, the PDF is generated by PHP code, The url is like Example Domain, i have tried to set Cache Level to Bypass to all the site but problem sill there.

This topic was automatically closed after 30 days. New replies are no longer allowed.