Please tell me what am I doing wrong? When I log into the application, I receive a cookie without the secure flag, samesite: none, which is why a backup one is set. Nextjs website on the app.ru domain, appwrite on the appwrite.app.ru domain, https everywhere. (SDK Web)
Summary
The user had an issue with a cookie (login) and received helpful responses from other users. The issue was resolved by changing the configuration due to an NPM issue. The user also asked about two cookies arriving and it was confirmed that this was normal. It was recommended to ensure forwarding to the https port and to use SSL certificates. The user mentioned self-hosting and using nginx proxy manager. The user asked for clarification on traffic from NPM to Appwrite and it was confirmed that it is https. The user also asked about any mistakes they might be making regarding receiving a cookie without the secure flag. The website is built using Nextjs
Drake
Admin
Oct 29, 2023, 15:21
Backup what? Are you on appwrite cloud?
Nik
Rank 1: Thread
Oct 29, 2023, 15:29
appwrite hosting
Drake
Admin
Oct 29, 2023, 15:37
You're self hosting? Do you have anything in front of Appwrite like a reverse proxy?
Nik
Rank 1: Thread
Oct 29, 2023, 15:39
Self-hosting, I use nginx proxy manager to redirect from server:3000 to the https domain
Drake
Admin
Oct 29, 2023, 15:40
Ummm is traffic from NPM to Appwrite https?
Nik
Rank 1: Thread
Oct 29, 2023, 15:49
That's right, SSL certificates are installed everywhere
Drake
Admin
Oct 29, 2023, 15:51
Soo Appwrite's https port is 3000?
Nik
Rank 1: Thread
Oct 29, 2023, 15:57
appwrite on port 3000, if you go through server ip: 3000, then there is http.
Drake
Admin
Oct 29, 2023, 15:58
Please make sure you're forwarding to the https port
Nik
Rank 1: Thread
Oct 29, 2023, 16:00
Okay, thanks, I'll check it out. I'll try to start everything again now.
Nik
Rank 1: Thread
Oct 31, 2023, 06:21
Good afternoon, you were right, it was an NPM issue, I changed the configuration and now there is a secure flag. Please also tell me why 2 cookies arrive, is this how it should be?
otik
Rank 2: Process
Oct 31, 2023, 14:09
Yes this is correct. Legacy cookie is for legacy reasons. You can ignore it