mirror of
https://github.com/bendtherules/piktochart-create-editor.git
synced 2026-08-18 22:02:56 +00:00
Add CORS header in server
This commit is contained in:
@@ -7,6 +7,11 @@ const junk = require( 'junk' );
|
||||
let app = express();
|
||||
|
||||
app.use( express.static('./') );
|
||||
app.use(function(req, res, next) {
|
||||
res.header("Access-Control-Allow-Origin", "*");
|
||||
res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
|
||||
next();
|
||||
});
|
||||
|
||||
// define file name and destination to save
|
||||
let storage = multer.diskStorage({
|
||||
|
||||
Reference in New Issue
Block a user