Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [setcookie]

The setcookie function sends an HTTP cookie to a client.

setcookie
0 votes
0 answers
5 views

How to host a express js backend in vercel,i am getting error 404

I am trying to host an express js backend api on vercel Here its my project structure for the backend folder . I am trying to host the backend folder everytime it says me 404 error not found This is ...
Rudra Sankha Sinhamahapatra's user avatar
0 votes
1 answer
40 views

Set Cookie in browser is not being persisted

I have an express code that sends the cookie to get requests in some route: res.cookie("userID", `${userSaved._id}`, { maxAge: 900000, httpOnly: true }); So when I make a get request in ...
NITIN RAI's user avatar
-1 votes
0 answers
22 views

Cookie isn't getting picked up by frontend, also disappears on refresh

I am developing this website using python3 backend and react frontend. I tried to set cookies for auth however no matter what setting i try the frontend just does not recognise it, and on refresh the ...
Ethan Chen's user avatar
0 votes
0 answers
55 views

I set a cookie on the server in the login handler, but the cookie is not set

It's my cors headers: r := chi.New Router() r.Use(cors.Handler(cors.Options{ AllowedOrigins: []string{"https://SECRET.COM", "http://SECRET.COM"}, AllowedMethods: []...
Imran's user avatar
  • 9
0 votes
0 answers
24 views

How to Properly Configure Cookies and CORS for Spring Boot Backend and React Frontend on Different Subdomains?

I am currently working on a project where the backend is implemented using Spring Boot & Spring Security, and the frontend is built with React. Both the backend and frontend are hosted on render....
Luk1e's user avatar
  • 1
0 votes
1 answer
42 views

Reactjs cient not receiving cookies from express server

I'm running my project on different servers, backend on render and frontend on vercel. However I'm only running into this error on deployment, meaning that the cookie is either not being set properly ...
TeDi's user avatar
  • 49
-1 votes
0 answers
23 views

NextJS apollo onError - refresh and set new access cookie not applied and used in retry requests

First time posting here, so let me know if you need more information. Couldn't figure out how to format the code so included it in a gist. What would like to be achieved When the access_token cookie ...
benlu's user avatar
  • 1
0 votes
1 answer
34 views

Laravel Jetstream: How to add cookies to store login information with laravel jetstrem on laravel 11

I want to store cookies after the user logs in for the client to use, but when I use laravel jetstream, I don't know how to add cookies after logging in. Note that I am trying to use two different ...
QNJOONG's user avatar
0 votes
0 answers
59 views

error: this attempt to set a cookie via SET-Cookie header was blocked because its domain attribute was invalid with regards to the current host url

I'm implementing authentication in a Node.js application by setting JWT tokens in cookies. Although the API request returns a status code of 200, the cookies are not being stored in the browser. ...
Abdur Rehman Khalid's user avatar
0 votes
0 answers
59 views

How to use Set-Cookie headers when use [laravel-sanctum] and [nginx reverse proxy]

I'm making laravel-santum(with vue3) and nginx reverse proxy server on Docker enviroment. I found something is worg when I send get request "/sanctum/csrf-cookie", there is no response 'Set-...
나는누구인가's user avatar
0 votes
0 answers
207 views

useCookie in Nuxt 3

I use Nuxt 3, Vue 3 and pinia. I try to set cookies: stores/auth.ts import { defineStore } from 'pinia'; export const useAuthStore = defineStore({ id: 'auth', state: () => { return { ...
Dev's user avatar
  • 79
2 votes
1 answer
118 views

Cookies are being rejected due to domain attribute from Sanctum (Laravel)

I am using two Google Cloud Run containers to host different applications. I changed the URLs in the question for privacy reasons (the structure stays the same obviously). A Laravel Backend which ...
beatcraft's user avatar
  • 279
-1 votes
1 answer
62 views

What is the next step after login for frontend? I am working with .NET 8 Blazor Web App InteractiveAuto

I am working on the Frontend of a Project and I am using the latest Blazor Web App InteractiveAuto after using InteractiveServer caused me a problem. To begin with, I created a login page, that take a ...
Amirul.gg's user avatar
0 votes
0 answers
29 views

Adding a Button with cookie durations

To frame what im trying to do. I work for a small reatailer and we had an idea for a promotion where we put a gift card in a small safe. The Safe has the numbers 1,2,3,4,5 and needs 5 a digit code to ...
VinsonCernuto 's user avatar
-1 votes
1 answer
57 views

Correct or set the cookie in jquery ajax request

I need to take data from this URL: https://e453eb.myshopify.com/products/chakananecklace.json and I write a code: // Now, make the AJAX request $.ajax({ url: 'https://e453eb.myshopify.com/...
Aleks Per's user avatar
  • 1,619

15 30 50 per page
1
2 3 4 5
82