4 ms·
You give up server redirects and cookie auth. (well you don't lose cookie auth, but you need extra steps for it to prevent CSRF)
by nurettin 2y ago
You give up server redirects and cookie auth. (well you don't lose cookie auth, but you need extra steps for it to prevent CSRF)
- stackghost 2y agoYou can just have the server return a json object instructing the frontend to navigate, accomplishing server redirects.
- ftmch 2y agoJavascript can do browser redirects, but those are not actual 301 HTTP redirects.
- stackghost 2y agoYes, what I'm saying is that you can have the backend return e.g. "{ "response": 301, "redirectUrl": "https://example.com https://example.com" }", and then have the frontend handle that properly, and you get the functional equivalent. I'm aware that it is different under the hood.