diff --git a/packages/reverse-proxy-service/src/server.ts b/packages/reverse-proxy-service/src/server.ts index 7d139b8c1..deadb0996 100644 --- a/packages/reverse-proxy-service/src/server.ts +++ b/packages/reverse-proxy-service/src/server.ts @@ -14,8 +14,6 @@ import oidcAuth from './middleware/oidcAuth'; import { updateApplicationCache } from './utils/applicationCache'; import http from 'http'; -declare module 'http' { interface Agent { maxHeaderSize?: number; } } - const MAX_HEADER_SIZE = 16 * 1024 * 1024; // 16MB ( http.globalAgent as http.Agent ).maxHeaderSize = MAX_HEADER_SIZE; diff --git a/packages/reverse-proxy-service/src/types/http.d.ts b/packages/reverse-proxy-service/src/types/http.d.ts new file mode 100644 index 000000000..3edfd5153 --- /dev/null +++ b/packages/reverse-proxy-service/src/types/http.d.ts @@ -0,0 +1,7 @@ +import * as http from 'http'; + +declare module 'http' { + interface Agent { + maxHeaderSize?: number; + } +} diff --git a/packages/reverse-proxy-service/tsconfig.json b/packages/reverse-proxy-service/tsconfig.json index 7dda885f2..7a71c16aa 100644 --- a/packages/reverse-proxy-service/tsconfig.json +++ b/packages/reverse-proxy-service/tsconfig.json @@ -50,7 +50,10 @@ // "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": [], /* List of folders to include type definitions from. */ + "typeRoots": [ + "src/types", + "node_modules/@types" + ], // "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'. */