Manual header setting (I've already commented out ...
# office-hours
a
Manual header setting (I've already commented out manual header settings like:) -> apps/backend/src/index.ts // Handle ngrok browser warning // app.use((req, res, next) => { // if (req.headers['ngrok-skip-browser-warning']) { // res.setHeader('ngrok-skip-browser-warning', 'true'); // } // next(); // }); -> server.ts // Serve static files from Next.js build if (!dev) { const staticPath = path.join(__dirname, '..', 'apps', 'frontend', '.next', 'static'); const nextPath = path.join(__dirname, '..', 'apps', 'frontend', '.next'); // Serve static assets with proper headers server.use('/_next/static', express.static(staticPath, { maxAge: '1y', immutable: true, // setHeaders: (res, filePath) => { // if (filePath.endsWith('.css')) { // res.setHeader('Content-Type', 'text/css'); // } // if (filePath.endsWith('.js')) { // res.setHeader('Content-Type', 'application/javascript'); // } // } })); // Serve Next.js files server.use('/_next', express.static(nextPath, { maxAge: '1y', immutable: true, //fix-commented-out-for-now // setHeaders: (res, filePath) => { // if (filePath.endsWith('.css')) { // res.setHeader('Content-Type', 'text/css'); // } // if (filePath.endsWith('.js')) { // res.setHeader('Content-Type', 'application/javascript'); // } // } })); } But the CRLF error persists.
3 Views