Skip to content

Commit

Permalink
fix(reverse-proxy): types added
Browse files Browse the repository at this point in the history
  • Loading branch information
soumyadip007 committed Dec 9, 2024
1 parent af48105 commit 8e6e217
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 0 additions & 2 deletions packages/reverse-proxy-service/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
7 changes: 7 additions & 0 deletions packages/reverse-proxy-service/src/types/http.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import * as http from 'http';

declare module 'http' {
interface Agent {
maxHeaderSize?: number;
}
}
5 changes: 4 additions & 1 deletion packages/reverse-proxy-service/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -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'. */
Expand Down

0 comments on commit 8e6e217

Please sign in to comment.