0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 14:12:40 +00:00

Move dbCheck to only API calls that touch the database

This commit is contained in:
G.Ambatte
2025-10-02 19:28:10 +13:00
parent 7c050fb9a9
commit f141c0bebd
2 changed files with 7 additions and 8 deletions

View File

@@ -32,7 +32,6 @@ import { splitTextStyleAndMetadata } from '../shared/helpers.js';
//==== Middleware Imports ====//
import contentNegotiation from './middleware/content-negotiation.js';
import dbCheck from './middleware/dbCheck.js';
import bodyParser from 'body-parser';
import cookieParser from 'cookie-parser';
import forceSSL from './forcessl.mw.js';
@@ -50,7 +49,6 @@ const sanitizeBrew = (brew, accessType)=>{
app.set('trust proxy', 1 /* number of proxies between user and server */);
app.use('/', serveCompressedStaticAssets(`build`));
app.use(dbCheck);
app.use(contentNegotiation);
app.use(bodyParser.json({ limit: '25mb' }));
app.use(cookieParser());