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

212
Views
Establecer cookie en axios que no funciona en la solicitud de dominio cruzado

tengo un cliente de reacción simple con axios en localhost, por otro lado tengo python fastapi en el lado del servidor (ambos https). el lado del servidor está configurando una cookie no httponly, el lado del cliente la recibe pero no la configura. aquí está mi respuesta:

 access-control-allow-credentials true access-control-allow-origin https://localhost access-control-expose-headers set-cookie content-length 52 content-type application/json date Sun, 19 Sep 2021 12:46:09 GMT server uvicorn set-cookie fakesession=fake-cookie-session-value; Max-Age=100000000; Path=/; SameSite=none; Secure vary Origin

aquí está mi código del lado del cliente:

 export const AxTest = axios.create({ //baseURL: "https://localhost:6069", baseURL: "https://***.***.***.***:3002", headers: { "Content-type": "application/json" }, withCredentials: true, });

la cookie no está configurada, no recibo ningún error y el código de respuesta es 200. document.cookie está vacío. por cierto, probé ambos en mi localhost (python y react ejecutándose en localhost) estaba configurando la cookie con éxito.

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!