diff --git a/main.js b/main.js index 9fc7d2d..5bb4902 100644 --- a/main.js +++ b/main.js @@ -7,14 +7,14 @@ const morgan = require("morgan"); const axios = require('axios'); var api = require("./package.json"); -const {pveAPI, pveAPIToken, listenPort} = require("./vars.js"); +const {pveAPI, pveAPIToken, listenPort, domain} = require("./vars.js"); const {init, requestResources, releaseResources} = require("./db.js"); const app = express(); app.use(helmet()); app.use(bodyParser.urlencoded({extended: true})); app.use(cookieParser()) -app.use(cors({origin: "https://client.tronnet.net"})); +app.use(cors({origin: domain})); app.use(morgan("combined")); diff --git a/vars.js.template b/vars.js.template index 4f652a0..41c283d 100644 --- a/vars.js.template +++ b/vars.js.template @@ -6,5 +6,6 @@ const pveAPIToken = { uuid: "" }; const listenPort = 80; +const domain = ""; -module.exports = {pveAPI, listenPort, pveAPIToken}; \ No newline at end of file +module.exports = {pveAPI, listenPort, pveAPIToken, domain}; \ No newline at end of file