Conversation
0f7d447 to
100d80e
Compare
Deploying with
|
| Latest commit: |
100d80e
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://75adaaf7.nftstorage-link.pages.dev |
| const headers = new Headers(request.headers) | ||
| headers.set('Referrer-Policy', 'unsafe-url') | ||
| headers.set('Location', url.toString()) | ||
| headers.set('Referer', request.headers.get('Referer')) |
There was a problem hiding this comment.
Does this work IRL? I thought this was one of those headers you're not allowed to set in a browser/worker context!?
There was a problem hiding this comment.
Also, this what we send back to the client right? Referer is a request header, I'm not sure I understand how this fixes the issue?
There was a problem hiding this comment.
This fix is based on discussion https://community.cloudflare.com/t/passing-on-referer-value-on-301-https-redirects/78787/8
The goal is to have CF analytics / Firewall have access to the Referer, which looks like not the case with current redirect.
Does this work IRL?
I need to deploy to see, using staging dedicated route it does not break anything, but for actually seeing analytics in nftstorage.link domain I need to get it there
On redirect we are dropping referer, let's keep it