- asggiunto bottone "installa app" sulla email di conferma registrazione e anche la Guida "/guida".
- migliorato InvitaAmico
This commit is contained in:
@@ -98,11 +98,12 @@ function logResponse(req, res, data) {
|
||||
|
||||
const emoji = statusCode >= 200 && statusCode < 300 ? '✅' : statusCode >= 400 && statusCode < 500 ? '⚠️' : '❌';
|
||||
|
||||
console.log(
|
||||
`${emoji} [${method}] ${url} | Status: ${statusCode} | User: ${userId} | Data: ${
|
||||
data ? JSON.stringify(data).substring(0, 100) : 'empty'
|
||||
}`
|
||||
);
|
||||
if (statusCode !== 200) {
|
||||
console.log(
|
||||
`${emoji} [${method}] ${url} | Status: ${statusCode} | User: ${userId} | Data: ${data ? JSON.stringify(data).substring(0, 100) : 'empty'
|
||||
}`
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
const authenticate = (req, res, next) => authenticateMiddleware(req, res, next);
|
||||
|
||||
@@ -62,6 +62,8 @@ function createCorsOptions(domains, domainsAllowed, isProduction, noCors = false
|
||||
|
||||
const allowedOrigins = buildAllowedOrigins(domains, domainsAllowed, isProduction);
|
||||
|
||||
console.log('allowedOrigins:', allowedOrigins.map((origin) => `'${origin}'`).join(', '));
|
||||
|
||||
let originValidator = (origin, callback) => {
|
||||
if (!origin) {
|
||||
// console.log('✅ Origin undefined or empty — allowing');
|
||||
|
||||
@@ -16,7 +16,7 @@ async function myLoad() {
|
||||
}
|
||||
|
||||
async function startServer(app, port) {
|
||||
const isProduction = process.env.NODE_ENV === 'production';
|
||||
const isProduction = ['production', 'test'].includes(process.env.NODE_ENV);
|
||||
const { domains, domainsAllowed } = parseDomains();
|
||||
const corsOptions = createCorsOptions(domains, domainsAllowed, isProduction);
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.2.78
|
||||
1.2.79
|
||||
Reference in New Issue
Block a user