Answers for "node fetch access-control-allow-origin"

1

fetch request allow cors

// From http://foo.com/
fetch('http://bar.com/data.json', { 
    mode: 'no-cors' // 'cors' by default
}).then(function(response) {
    // Do something with response
});
Posted by: Guest on June-25-2021
1

add access-control-allow-origin in node js

// Install cors package: npm install cors
const express = require("express");
const app = express();
const cors = require('cors');
app.use(cors());
// your http request should work after this
Posted by: Guest on October-14-2021

Code answers related to "node fetch access-control-allow-origin"

Code answers related to "Javascript"

Browse Popular Code Answers by Language