Good morning,
I have a express Webserver that I use to host JavaScript files. Those files are implemented on websites using script tags.
The Webservers router checks it’s referrer and can respond with different files accordingly. For example page.com has my JavaScript files added. Accessing page.com?js debug will cause my Webserver to send a file without minification and with console.logs.
Now I want my server to benefit from Cloudflares CDN. I setup everything and added my js file routes as a page-rule, as they are not standard static file routes. But now Cloudflare will serve a cached file on every request, regardless of the referrer.
How can I tell Cloudflare that the file might change based on the referrers query string?