Skip to content

Commit

Permalink
Update header
Browse files Browse the repository at this point in the history
  • Loading branch information
مِيزَانُ الْدِّينْ عَبْدُ ذِيْ الْجَلَالِ وَ الْإِكْرَامِ committed Jul 11, 2019
1 parent 73b5d23 commit bdd130b
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 4 deletions.
2 changes: 2 additions & 0 deletions bootstrap/wafMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion routes/delete.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 0 additions & 1 deletion routes/get.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 0 additions & 1 deletion routes/post.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 0 additions & 1 deletion routes/put.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit bdd130b

Please sign in to comment.