- Catalogo: Aggiunta di Schede
This commit is contained in:
@@ -106,6 +106,7 @@ myLoad().then(ris => {
|
||||
require('./models/newstosent');
|
||||
require('./models/mypage');
|
||||
require('./models/myelem');
|
||||
require('./models/myscheda');
|
||||
require('./models/bot');
|
||||
require('./models/calzoom');
|
||||
const mysql_func = require('./mysql/mysql_func');
|
||||
@@ -805,7 +806,7 @@ function startServer(app, port) {
|
||||
const NOCORS = false;
|
||||
const CORS_ENABLE_FOR_ALL_SITES = false;
|
||||
|
||||
const ISDEBUG = true;
|
||||
const ISDEBUG = false;
|
||||
|
||||
let corsOptions = {};
|
||||
|
||||
@@ -842,7 +843,7 @@ function startServer(app, port) {
|
||||
}
|
||||
},*/
|
||||
credentials: false,
|
||||
methods: ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS'],
|
||||
methods: ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS', 'PATCH'],
|
||||
allowedHeaders: [
|
||||
'Origin',
|
||||
'X-Requested-With',
|
||||
@@ -861,6 +862,7 @@ function startServer(app, port) {
|
||||
// Applica CORS come primo middleware
|
||||
app.use(cors(corsOptions));
|
||||
|
||||
// HO AGGIUNTO QUESTA RIGA PER IL CORS !!!!!!!
|
||||
app.use(express.json()); // Middleware per il parsing del corpo JSON
|
||||
|
||||
// Gestione specifica delle richieste OPTIONS
|
||||
|
||||
Reference in New Issue
Block a user