Update: Add Origin, Credentials
This commit is contained in:
parent
8c1d9cd4c7
commit
925dc1c178
1 changed files with 6 additions and 0 deletions
|
|
@ -3,6 +3,12 @@ const express = require('express');
|
||||||
const app = express();
|
const app = express();
|
||||||
const port = process.env.PORT || 3000;
|
const port = process.env.PORT || 3000;
|
||||||
|
|
||||||
|
const cors = require('cors');
|
||||||
|
app.use(cors({
|
||||||
|
origin: '*',
|
||||||
|
credentials: true
|
||||||
|
}));
|
||||||
|
|
||||||
app.use(express.static(__dirname + '/dist/frontend-admin'));
|
app.use(express.static(__dirname + '/dist/frontend-admin'));
|
||||||
app.get('/*', function(req,res) {
|
app.get('/*', function(req,res) {
|
||||||
res.sendFile(path.join(__dirname+ '/dist/frontend-admin/index.html'));
|
res.sendFile(path.join(__dirname+ '/dist/frontend-admin/index.html'));
|
||||||
|
|
|
||||||
Reference in a new issue