fix(admin): CSRF cookie sameSite=false for Tor, auth cookie fix, async handlers, validation
This commit is contained in:
@@ -5,7 +5,7 @@ import { dirname, join } from 'path';
|
||||
import ejsLayouts from 'express-ejs-layouts';
|
||||
import logger from '../utils/logger.js';
|
||||
import { requireAuth, handleLogin, handleLogout } from './auth.js';
|
||||
import { csrfMiddleware, validateCsrf } from './csrf.js';
|
||||
import { csrfMiddleware, validateCsrf, validateCsrfFromBody } from './csrf.js';
|
||||
import { asyncHandler, globalErrorHandler } from './errorHandler.js';
|
||||
import dashboardRouter from './routes/dashboard.js';
|
||||
import catalogRouter from './routes/catalog.js';
|
||||
@@ -33,6 +33,7 @@ app.set('layout', 'layout');
|
||||
|
||||
app.use(cookieParser());
|
||||
app.use(express.urlencoded({ extended: true }));
|
||||
app.use(express.json());
|
||||
// Serve static assets from public directory
|
||||
app.use(express.static(join(__dirname, 'public')));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user