1

I am attempting to make a Fetch request with Javascript using: credentials: 'same-origin' method: 'GET'

But in the fetch request I am unable to pass a client (browser) cookie in the request headers. I know that the issue is not a cors issue as that was corrected on both the client and server.

In the Header it looks like all other values are correct except that there is no cookie in the fetch request.

1 Answer 1

1

Since you had to correct a CORS issue, you must be making a cross-origin request.

That means it isn't a same-origin request and you need to use include not same-origin.

Note that the cookies sent will be the ones associated with the origin you are making the request to, not from.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.