kopia lustrzana https://github.com/OpenBuilds/OpenBuilds-CONTROL
rodzic
2d052217d4
commit
8350c74e68
|
@ -1,3 +1,4 @@
|
|||
v1.0.352: Fixed API integration for cam.openbuilds.com
|
||||
v1.0.352: Added support for nodeIntegration (Additional backend support for awesome JS Macros)
|
||||
v1.0.351: Updated defaults for Surfacing Wizard UI, Updated text on Recovery wizard
|
||||
v1.0.350: Updated all dependencies, Updated to Node 18, Removed Drivelist Dependency
|
||||
|
|
22
index.js
22
index.js
|
@ -60,6 +60,18 @@ var fluidncConfig = "";
|
|||
app.use(express.static(path.join(__dirname, "app")));
|
||||
//app.use(express.limit('200M'));
|
||||
|
||||
app.use(function setCommonHeaders(req, res, next) {
|
||||
res.set("Access-Control-Allow-Private-Network", "true");
|
||||
next();
|
||||
});
|
||||
|
||||
app.all('/*', function(req, res, next) {
|
||||
res.header("Access-Control-Allow-Origin", "*");
|
||||
res.header("Access-Control-Allow-Headers", "X-Requested-With");
|
||||
res.header("Access-Control-Allow-Private-Network", "true");
|
||||
next();
|
||||
});
|
||||
|
||||
|
||||
// Interface firmware flash
|
||||
app.post('/uploadCustomFirmware', (req, res) => {
|
||||
|
@ -501,7 +513,6 @@ var PortCheckinterval = setInterval(function() {
|
|||
|
||||
checkPowerSettings()
|
||||
|
||||
|
||||
// JSON API
|
||||
app.get('/api/version', (req, res) => {
|
||||
res.header("Access-Control-Allow-Origin", "*");
|
||||
|
@ -593,8 +604,9 @@ app.post('/upload', function(req, res) {
|
|||
});
|
||||
|
||||
form.on('fileBegin', function(name, file) {
|
||||
debug_log('Uploading ' + file.name);
|
||||
file.path = uploadsDir + file.name;
|
||||
debug_log(JSON.stringify(name));
|
||||
debug_log(JSON.stringify(file));
|
||||
debug_log('Uploading ' + file.filepath);
|
||||
});
|
||||
|
||||
form.on('progress', function(bytesReceived, bytesExpected) {
|
||||
|
@ -607,9 +619,9 @@ app.post('/upload', function(req, res) {
|
|||
});
|
||||
|
||||
form.on('file', function(name, file) {
|
||||
debug_log('Uploaded ' + file.path);
|
||||
debug_log('Uploaded ' + file.filepath);
|
||||
showJogWindow()
|
||||
readFile(file.path)
|
||||
readFile(file.filepath)
|
||||
});
|
||||
|
||||
form.on('aborted', function() {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "OpenBuildsCONTROL",
|
||||
"version": "1.0.352",
|
||||
"version": "1.0.353",
|
||||
"license": "AGPL-3.0",
|
||||
"description": "OpenBuildsCONTROL CNC Machine Host Software",
|
||||
"author": "github.com/openbuilds <support@openbuilds.com>",
|
||||
|
|
Ładowanie…
Reference in New Issue