#I'm having problems with session cookies in Safari but not Chrome

1 messages · Page 1 of 1 (latest)

rich wadi
#

Hi,
I'm having problems with session cookies in Safari. Using a JS Fetch with Credentials:Include, the session cookies are picked up when using Chrome, but a req.session.data[] is empty when coming from Safari. Any ideas?

rigid pewter
#

If you print the incoming request on Vapor (or in the network inspector in safari) can you see the cookie being attached?

#

And what does the cookie look like? (Ie all the properties)

rich wadi
#

Hi @rigid pewter I can see the request cookie:

#

print(req.session.data) gives:

#

print(req.headers[.cookie]) gives:

#

Thanks for your help

rigid pewter
#

Mainly same site and HTTP only

#

Other you might need to do some debugging

#

And see if the session ID is the same when you set some data and make a subsequent request