as the title sais, i’m trying to configure a local rest api server running node js and in the meantime i have a vue project with axios. i surfed the whole internet, tried every server/client configuration, server headers settings, cors package, axios header config, but i still have cors policy error inthe console. postman works […]
- Tags 'GET, 'PUT', 'X-Requested-With'], "*"); res.header( "Access-Control-Allow-Headers", () => { console.log("Server is listening on port: ", //['Authorization'], //['Content-Type', Accept, Access-Control-Allow-Request-Method" ); res.header("Access-Control-Allow-Methods", apiRouter) // CORS middleware app.use(function (req, as the title sais, axios header config, but axios from the browser dont. could everyone indicate some working fix? here is my actual node configuration: const express = require("e, but i still have cors policy error inthe console. postman works by calling localhost:3000/everyapiPOSTorGet, cors package, DELETE"); next(); }) app.listen(PORT, DELETE"); res.header("Allow", i'm trying to configure a local rest api server running node js and in the meantime i have a vue project with axios. i surfed the whole inter, next ) { res.header("Access-Control-Allow-Origin", OPTIONS, Origin, PORT); }); thank you! edit: i forgot to say that obviously vue project goes on localhost:8080 or 8081 (depends if i have more project runni, post, res); }); }, server headers settings, tried every server/client configuration, X-Api-Key