sciter-js-sdk
                                
                                
                                
                                    sciter-js-sdk copied to clipboard
                            
                            
                            
                        Cannot specify a custom "Cookie" header in Fetch API
Describe the bug No matter what kind of way I attempt to do so, I cannot include a custom Cookie header in a Fetch request. It seems that cookies are handled by the SDK automatically, and thus previously set cookies are automatically sent in the following requests. It appears that this behavior cannot be changed. I also tried various values of the "credentials" ("include", "omit") and they didn't change anything about this bug.
To Reproduce Steps to reproduce the behavior (scenario 1):
- Do 
fetch("https://example.com/api/user", { headers: { 'Cookie': 'SessionToken=' + this.token } }) - Server responds with "not logged in" error, because the value of cookie wasn't set
 
Steps to reproduce the behavior (scenario 2):
- Make a request to a server that sets a cookie with "Set-Cookie" header
 - Make another request to the same server
 - The value of "Cookie" header is now being sent, without any way to disable/get rid of that
 
Expected behavior
- Can specify a custom value of "Cookie" header, taking a precedence over whatever the header would normally be set to
 - Have an option to not handle cookies automatically at all
 
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: [e.g. iOS] Windows 10
 - Browser [e.g. chrome, safari] sciter quark
 - Version [e.g. 22] latest commit (0f2022f), but problem happened for long time
 
Additional context I cannot add a nice login session persistence to my app because of this. I want to handle login manually and just specify the cookie with "Cookie" header for API requests then.
same problem!!