Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

200
Views
¿Por qué Set-Cookie no se almacena?

Tengo la siguiente respuesta HTTP:

 Access-Control-Allow-Credentials: true Access-Control-Allow-Headers: accept, authorization, content-type, origin, x-requested-with, user-agent, access-control-allow-origin, crossdomain, access-control-allow-credentials, x-requested-with Access-Control-Allow-Methods: GET, POST, PUT, OPTIONS, DELETE, PATCH Access-Control-Allow-Origin: https://speechifai-dashboard-fe.herokuapp.com Access-Control-Max-Age: 600 Connection: keep-alive Content-Length: 35 Content-Type: application/json; charset=utf-8 Date: Fri, 25 Feb 2022 05:52:17 GMT Server: Cowboy Set-Cookie: sessionIdSp=+5BtM+x+ZZ262Vs362qgUUmJE8PXd12G+AwMSdH14JQ=; Path=/; Secure; HttpOnly; SameSite=Lax

El enlace está aquí, puedes probar: https://speechifai-dashboard-fe.herokuapp.com/createPost

Entonces, el frontend se conecta al backend, el backend envía una cookie, pero no puedo ver debajo de Cookies , ¿por qué? ¿Qué echo de menos?

Tengo un backend de Vapor:

Tiene la siguiente configuración, ¿qué está mal?

 app.middleware.use(CORSMiddleware(configuration: .init( allowedOrigin: .originBased,//.originBased, allowedMethods: [.GET, .POST, .PUT, .OPTIONS, .DELETE, .PATCH], allowedHeaders: [.accept, .authorization, .contentType, .origin, .xRequestedWith, .userAgent, .accessControlAllowOrigin, .init("crossDomain"), .accessControlAllowCredentials, .xRequestedWith], allowCredentials: true )), at: .beginning) // Change the cookie name to "foo". app.sessions.configuration.cookieName = cookieName // Configures cookie value creation. app.sessions.configuration.cookieFactory = { sessionID in print("sessionID.string: \(sessionID.string)") return .init(string: sessionID.string, isSecure: true, isHTTPOnly: true) }

Llamando aquí backend desde React frontend:

 axios({ method: "post", url: "registerEmail", data: {}, headers: { "Content-Type": "application/json", crossDomain: true, }, }) .then((res) => { dispatch(setGetUser(res.data)); }) .catch((err) => console.error(err));
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!