Answers for "axios blocked by cors policy"

2

axios delete is throwing cors error

headers: {"Access-Control-Allow-Origin": "*"}
Posted by: Guest on June-02-2020
0

axios add no cors

Axios({
            method: 'post',
            headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
            url: 'https://localhost:44346/Order/Order/GiveOrder',
            data: order
          }).then(function (response) {
            console.log(response.data);
          });
Posted by: Guest on February-18-2022
1

cors axios

const cors = require("cors");

app.options("*", cors({ origin: 'http://localhost:8000', optionsSuccessStatus: 200 }));

app.use(cors({ origin: "http://localhost:8000", optionsSuccessStatus: 200 }));
Posted by: Guest on October-27-2021

Code answers related to "axios blocked by cors policy"

Code answers related to "Javascript"

Browse Popular Code Answers by Language