Skip to content

Commit

Permalink
fix: changes in http header size (#1771)
Browse files Browse the repository at this point in the history
  • Loading branch information
riginoommen authored Dec 11, 2024
2 parents 455a0a1 + e386f6a commit 6f19fee
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 18 deletions.
2 changes: 1 addition & 1 deletion packages/reverse-proxy-service/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ COPY --from=builder $HOME/.env.example .

EXPOSE 8080

CMD ["node", "dist/index.js"]
CMD ["node", "--max-http-header-size=10485760", "dist/index.js"]
2 changes: 1 addition & 1 deletion packages/reverse-proxy-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "src/index.ts",
"scripts": {
"start": "npm run serve",
"serve": "node dist/index.js",
"serve": "node --max-http-header-size=10485760 dist/index.js",
"dev": "nodemon",
"prebuild": "rimraf dist",
"build": "tsc",
Expand Down
5 changes: 0 additions & 5 deletions packages/reverse-proxy-service/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ import store from './setup/store';
import { COOKIE_SECRET } from './setup/env';
import oidcAuth from './middleware/oidcAuth';
import { updateApplicationCache } from './utils/applicationCache';
import http from 'http';

const MAX_HEADER_SIZE = 16 * 1024 * 1024; // 16MB

( http.globalAgent as http.Agent ).maxHeaderSize = MAX_HEADER_SIZE;

const getServer = async () => {
const server = express();
Expand Down
7 changes: 0 additions & 7 deletions packages/reverse-proxy-service/src/types/http.d.ts

This file was deleted.

5 changes: 1 addition & 4 deletions packages/reverse-proxy-service/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,7 @@
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
"typeRoots": [
"src/types",
"node_modules/@types"
],
// "typeRoots": [],
// "types": [], /* Type declaration files to be included in compilation. */
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
Expand Down

0 comments on commit 6f19fee

Please sign in to comment.