plain-lunch-50969
08/08/2022, 2:16 PM/etc/hosts
for the GUI and the public endpoint for Kratos (https://[domain]
and https://[domain]/auth
. (Both in the same domain.) In k8s I've got two ingresses, one for each path. However when I run the browser in development mode, it's on port 9000. (Or at least not on 443). To handle this, I've setup a reverse proxy that proxies https://[domain]:9000
to https://[domain]
. So the k8s ingresses will see the correct domain. This is kind of working, but I suspect is the cause of my CSRF errors.
So how do others setup client-side browser development?proud-plumber-24205
08/09/2022, 6:32 AM/etc/hosts
)
CSRF and other cookie related issues are usually a problem due to the domain of your browser not being the same as the domain kratos is setting the cookies on. Insecure requests without TLS could also be a problem and might require the reverse proxy to set the certificates in your local trust store (e.g. Caddy can do this).
Mixing up localhost and 127.0.0.1 - they are different domains.
The best thing to do is diagnose the setup step by step, eliminate each suspect in the system.
Try run Kratos with the --dev
flag, see if that might be the issue in this case.red-machine-69654
08/09/2022, 8:49 AM<http://nip.io|nip.io>
domains locallyplain-lunch-50969
08/09/2022, 1:55 PM--dev
. I have not set up the cookie domain. I'll try that, thanks. I am using self-signed certs which the browser may see as insecure as well.