Answers for "Axios withCredentials"

0

Axios withCredentials

import axios from 'axios'

axios.post(API_SERVER + '/login', { email, password }, { withCredentials: true })
Posted by: Guest on May-02-2021
3

axios.defaults.withcredentials = true

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

app.use(cors(corsConfig));
app.options('*', cors(corsConfig));
Posted by: Guest on August-16-2020
-1

axios httponly cookie

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

client(axios):
axios.defaults.withCredentials = true;
Posted by: Guest on January-12-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language