1 個回答
- 最新
- 最多得票
- 最多評論
0
I found the issue, apparently it was not related to AWS but to the way I set the cookie containing the JWT token that I'm using to make requests to the backend.
The issue was that the cookie was not saved on the browser when it got back with the login response and the private route that I'm using was redirecting me to the login page since it didn't find the cookie (as if I was not logged in). Locally it worked, but on the Elastic BeanStalk instance it didn't save the cookie since the connection was not HTTPS.
To overcome the issue and be able to save the cookie on the AWS instance, I sent it from the backend using a Set-Cookie header and also used the read-only property credentials: 'include' on each request I make (including the login one).
已回答 4 個月前
相關內容
- 已提問 2 年前
- AWS 官方已更新 19 天前
- AWS 官方已更新 10 個月前
- AWS 官方已更新 1 個月前