Closed schoenwaldnils closed 2 years ago
Nevermind .. this way it works
extraHeaders: '{ "Set-Cookie": "USE_COOKIE_CONSENT_STATE={%22session%22:false}; Path=/" }'
Nevermind again :/ it seems the one test with the path just was a fluke. Now the cookie doesn't seem to be set and the cookie banner is shown 🤔
@schoenwaldnils - Set-Cookie
is a response header. You cannot set it in the request and expect it to forward to the response. You need to figure what the request header is that will trigger your server to respond with that response header.
In summary:
I just dug through this project again and re-kicked all tests. The extraHeaders
feature is tested in this project and confirmed that it still works as expected. Here's how it's tested:
extraHeaders
set.@schoenwaldnils as I just spent a half hour of my day on this... please next time do your due diligence and experiment with your implementation before opening an issue in an open source project.
Contributors of open source projects volunteer time to maintain, and it's not fair for us to spend time on something that the issue opener has barely spent on. Good luck.
@adamhenson I just duplicated your headerServer.ts on my project and can confirm that the headers are set.
You are correct with Set-Cookie
being a response header. I wrongly assumed they would work in the extraHeaders.
I don't open issues before testing it on my end. On this I spend at least 2h on trying to figure out the problem. But sometimes I get stuck and just can't figure out whats wrong.
Be sure I did't wanted to waste you time
I get it, thanks. Good luck.
This config:
does not seem to be applyed. I'd exspect the
USE_COOKIE_CONSENT_STATE
cookie to be set and therfore the cookie banner not to be visible. But it doesn't work :/