Heya,
we’ve moved domains for a little pet project and I’ve set up a 301 redirect rule as a result of that.
I would like to include an obnoxious banner in the webapp informing users to fix their bookmarks, but I can’t seem to get any headers.
Is there any way for my origin to figure out whether a request was redirected using the rule or made directly to that uri?
The easiest way to go about this would most likely be using Query Parameters and having your origin check from that.
Make your redirect target https://yoursite.com/correctpath?redirected=true and then have your origin check for the query parameter.
Outside of that, header modification comes too late in the traffic sequence, it would already have been changed. If you really needed a header, you could perhaps use a Modify Request Header checking for the same query parameter you set via a Page/Redirect Rule, or just use a Cloudflare Worker on that path to return a 301 with the exact headers you want.