Don’t know why, but my head just doesn’t want to grasp what you can and cannot do with CORS requests, using fetch API.
I know some of you are developers, so I ask for your help.
Can I set an access cookie in a CORS request like this?
I checked this StackOverflow question, but it didn’t make it clear to me.
I know I can solve it in these ways:
- Move
auth.wolfery.com
into the same domain as origin, (e.g.https://wolfery.com/auth
) - Instead of a CORS request, use a redirect, which then redirects back.
We are currently doing 1), so that is why it is working now. But to prepare for multi-realm support, I want the authentication server to be separated from the realm.
And I wish to avoid 2) because of vanity; it feels nicer/smoother if the webapp doesn’t bounce between sites.
So… Is it possible?
/Accipiter