“Axios Withredentials” Kode Jawaban

Axios Withredentials

import axios from 'axios'

axios.post(API_SERVER + '/login', { email, password }, { withCredentials: true })
Mohamed Awde

Axios.Defaults.WithCredentials = true

const corsConfig = {
  origin: true,
  credentials: true,
};

app.use(cors(corsConfig));
app.options('*', cors(corsConfig));
Precious Polecat

AXIOS HTTPONLY COVEIE

server: 
res.setHeader('Access-Control-Allow-Origin', 'http://localhost:3000');
res.setHeader('Access-Control-Allow-Credentials',true);

client(axios):
axios.defaults.withCredentials = true;
Disgusted Dugong

Jawaban yang mirip dengan “Axios Withredentials”

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya