This is a protocol question - not related to a specific programming language.
Let's say we currently have:
- a website using the domain:
example.com
- a frontend app at:
example.com/example-front
- an API at:
example.com/api/example-data
- all addresses using HTTPS.
- The front-end app calls the API to log in and gets a
set-cookie: data=SOME_DATA; Secure; httpOnly; Path=/; Domain=example.com
and it works as expected.
- We want to transfer the frontend app from
example.com/example-front
tofront.example.com
. - The API will stay at the same address.
What should be done (frontend / backend / subdomain gateway) in order to make this work?
(already tried to set domain=.example.com
and sameSite=None
).