TheOneThatPlaysTooMuch
TheOneThatPlaysTooMuch
DDeno
Created by TheOneThatPlaysTooMuch on 3/8/2025 in #help
Cookie issues
I fixed the problem, and now the code for setting the cookie looks like this:
ctx.response.headers.append(
"set-cookie",
`session=${session.secret}; Path=/; HttpOnly; Secure; SameSite=Lax; `,
);
ctx.response.headers.append(
"set-cookie",
`session=${session.secret}; Path=/; HttpOnly; Secure; SameSite=Lax; `,
);
But I still don't understand, why does adding those attributes make it work? which one of them made it work? where can I read more about this? also why is it that the cookie always registered with Expires=session instead of the actual expiration date when I tried to add it?
4 replies
DDeno
Created by TheOneThatPlaysTooMuch on 2/26/2025 in #help
CORS problem with my deno web server
I changed the code to use
new WebSocket();
new WebSocket();
and now it works. Thanks.
7 replies
DDeno
Created by TheOneThatPlaysTooMuch on 2/26/2025 in #help
CORS problem with my deno web server
This is what the code looks like with the change :
7 replies
DDeno
Created by TheOneThatPlaysTooMuch on 1/29/2025 in #help
Problem with my api route
Hi! I actually found out why it doesn't work but I still don't know why its like this: when I fetch a full url like "https://google.com" its fine, but when I fetch a relative url like "/api/login" called from a server component, it says it is an invalid url, but when I call it from an island component, its fine.
4 replies