Rank 3: Container
Hi I do know this isn't fully appwrite related but the api endpoint does use appwrite :3. So the problem is that when I try to access localhost:3001 (and the front end on localhost:3000) and in the fetch include credentials everything works fine. But the problem is when I use a different origin so for example 127.0.0.1:3001 and still front end on localhost:3000 because it wont send the cookies and been working to fix this issue all day and now I am lost...
let test = await fetch("http://localhost:3001/api/checkout/createInvoice?amount=5100", { method: "POST", "headers": { "Content-Type": "application/json", }, body: JSON.stringify({ "currency": "USD", "description": "test", }), "credentials": "include"});test = await test.json();console.log(test);``` (Fetch example)
The first img one is the one that failed and the second is the one that works