-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
user-agent header always the same in cloudflare pages #4668
Comments
For me the demo, it's showing the right result. |
Actually that was the first time, second time(after I changed it) it was the same as the first time. And the CF cache header is |
Isn't that weird that Cloudflare caches the page for different devices ? Seems it's cached even for different IPs : I have the same result on my phone with 4G. |
It's per region (colocation) only, probably |
But I'm not sure how you turned it on, because it's not in your code |
It should somewhere in their panel |
I didn't turned anything on, I tested on a fresh project, so it must be on by default. The Cloudflare Pages panel is quite small and doesn't seem to grant control over caching. The problem is not related to sveltekit so I will close the issue. @PH4NTOMiki thank you for pointing out where the problem was. |
No problem, cc @lukeed maybe he can help you |
Describe the bug
When deploying to cloudflare pages, the "user-agent" header in the Handle Hook seems to always have the same value.
It works as expected while running in dev or preview in local.
It tried disabling prerendering and disabling ssr but it changes nothing.
I don't even know if the problem is comming from the cloudflare adapter, cloudflare itself, or sveltekit
Reproduction
hooks.ts
index.svelte
Deploy to cloudflare pages
It setted up a pages just to test this behaviour if you want to see the result for yourself : https://test-bug-cloudflare.pages.dev/
No matter the device, the same text is printed.
Logs
No response
System Info
Severity
serious, but I can work around it
Additional Information
No response
The text was updated successfully, but these errors were encountered: