can't do connect to tutorials (http://localhost:8080/api/tutorials/)
tst32 opened this issue · 1 comments
tst32 commented
Does it works with https://github.com/bezkoder/node-js-mongodb-pagination back-end ?
tst32 commented
Yes, it works fine! the only thing is to set backend server.js
var corsOptions = {
- origin: "http://localhost:8081"
+ origin: true
};the others attempts as setuping client TutorialService.ts
const apiClient = axios.create({
baseURL: "http://localhost:8080/api",
headers: {
"Content-type": "application/json",
// "Access-Control-Allow-Origin": "*",
// "Referer": "http://localhost:8081",
// "Referrer-Policy": "strict-origin-when-cross-origin",
// above three useless
},
});