How do I access the headers I set in middleware? #39300
Unanswered
WillPwn4Food
asked this question in
Help
Replies: 1 comment
-
Not positive, but it sounds like the issue is that you're trying to use |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
So with middleware I can set custom headers by doing something like:
response.headers.set('x-utm-date', utmDate);
, that seems easy enough, similar to how I set the cookies, which works.Now when I load my static page, I'd love to see those custom headers I just sent over so I can take action on them, but I have no idea how to access them or if it's even possible. I can't find any documentation on this. I assume I would have to do it in
useEffect
or is it somehow passed in as aprop
that I don't know about?Please let me know if you have any ideas. If I can't access it, what's the point of setting the headers?
Thanks,
Beta Was this translation helpful? Give feedback.
All reactions