Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

roll back express upgrade #1862

Merged
merged 1 commit into from
Dec 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
build/
prod.env
xids.csv
preprod.env
14 changes: 7 additions & 7 deletions server/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ dotenv.config();

import Promise from "bluebird";
import express from "express";
import compression from "compression";
import cookieParser from "cookie-parser";
import bodyParser from "body-parser";
// import compression from "compression";
// import cookieParser from "cookie-parser";
// import bodyParser from "body-parser";
import morgan from "morgan";

import Config from "./src/config";
Expand Down Expand Up @@ -225,16 +225,16 @@ helpersInitialized.then(
app.use(middleware_responseTime_start);

app.use(redirectIfNotHttps);
app.use(cookieParser());
// app.use(bodyParser());
app.use(express.cookieParser());
app.use(express.bodyParser());
app.use(writeDefaultHead);

if (devMode) {
app.use(compression());
app.use(express.compress());
} else {
// Cloudflare would apply gzip if we didn't
// but it's about 2x faster if we do the gzip (for the inbox query on mike's account)
app.use(compression());
app.use(express.compress());
}
app.use(middleware_log_request_body);
app.use(middleware_log_middleware_errors);
Expand Down
Loading
Loading