Skip to content

Commit

Permalink
fix(reverse-proxy): increase request header size limit
Browse files Browse the repository at this point in the history
  • Loading branch information
soumyadip007 authored Dec 9, 2024
1 parent e876d73 commit 701ad84
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/reverse-proxy-service/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ 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';
import https from 'https';

declare module 'http' { interface Agent { maxHeaderSize?: number; } }
declare module 'https' { interface Agent { maxHeaderSize?: number; } }

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

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

const getServer = async () => {
const server = express();
Expand Down

0 comments on commit 701ad84

Please sign in to comment.