Browsers won’t pass on arbitrary headers in a redirect, but you could set a cookie with the Set-Cookie
header I think - the gymnastics of that depend on the origin of the URL you’re redirecting from. That could be a solution for this exact problem. If I developed this, i’d probably stick with the query parameter though - that’s far easier to debug, if anything goes wrong.