diff --git a/bootstrap/wafMiddleware.php b/bootstrap/wafMiddleware.php index 1f40c28..dd4f08b 100644 --- a/bootstrap/wafMiddleware.php +++ b/bootstrap/wafMiddleware.php @@ -25,6 +25,8 @@ // Add headers to request $request = $request->withAddedHeader('X-WAF-KEY', getenv('WAF_KEY')); + $request = $request->withAddedHeader('User-Agent', 'VesicaWAF/1.0 '); + $request = $request->withAddedHeader('X-LOAD-BALANCER', $request->getHeader('X-LOAD-BALANCER')); $wafNamespace = getenv('WAF_PROXY_NAMESPACE'); $logger = new Logger($wafNamespace); diff --git a/routes/delete.php b/routes/delete.php index 1d454e4..2596d75 100644 --- a/routes/delete.php +++ b/routes/delete.php @@ -22,7 +22,6 @@ ->forward($request) ->filter(function (Request $request, Response $response, $next) { // Manipulate the request object. - $request = $request->withAddedHeader('User-Agent', 'VesicaWAF/1.0 '); $request = $request->withHeader('X-Forwarded-For', $request->getHeader('X-Forwarded-For')); // Call the next item in the middleware. diff --git a/routes/get.php b/routes/get.php index fc1f12f..74d06fb 100644 --- a/routes/get.php +++ b/routes/get.php @@ -22,7 +22,6 @@ ->forward($request) ->filter(function (Request $request, Response $response, $next) { // Manipulate the request object. - $request = $request->withAddedHeader('User-Agent', 'VesicaWAF/1.0 '); $request = $request->withHeader('X-Forwarded-For', $request->getHeader('X-Forwarded-For')); // Call the next item in the middleware. diff --git a/routes/post.php b/routes/post.php index bf696b2..12ffeda 100644 --- a/routes/post.php +++ b/routes/post.php @@ -22,7 +22,6 @@ ->forward($request) ->filter(function (Request $request, Response $response, $next) { // Manipulate the request object. - $request = $request->withAddedHeader('User-Agent', 'VesicaWAF/1.0 '); $request = $request->withHeader('X-Forwarded-For', $request->getHeader('X-Forwarded-For')); // Call the next item in the middleware. diff --git a/routes/put.php b/routes/put.php index 795e14c..12b1b2d 100644 --- a/routes/put.php +++ b/routes/put.php @@ -22,7 +22,6 @@ ->forward($request) ->filter(function (Request $request, Response $response, $next) { // Manipulate the request object. - $request = $request->withAddedHeader('User-Agent', 'VesicaWAF/1.0 '); $request = $request->withHeader('X-Forwarded-For', $request->getHeader('X-Forwarded-For')); // Call the next item in the middleware.