Skip to content

Commit 4bcd2b0

Browse files
oleksandr-ncbackportbot[bot]
authored andcommitted
fix: remove "content-length" in AppAPI proxy
Signed-off-by: Oleksander Piskun <[email protected]>
1 parent b523a4a commit 4bcd2b0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/Controller/ExAppProxyController.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,13 +319,16 @@ private function buildHeadersWithExclude(array $route, array $headers): array {
319319
if (!in_array('x-origin-ip', $headersToExclude)) {
320320
$headersToExclude[] = 'x-origin-ip';
321321
}
322+
if (!in_array('content-length', $headersToExclude)) {
323+
$headersToExclude[] = 'content-length';
324+
}
322325
$headersToExclude[] = 'authorization-app-api';
323326
foreach ($headers as $key => $value) {
324327
if (in_array(strtolower($key), $headersToExclude)) {
325328
unset($headers[$key]);
326329
}
327330
}
328-
$headers['X-Origin-IP'] = $this->request->getRemoteAddress();
331+
$headers['x-origin-ip'] = $this->request->getRemoteAddress();
329332
return $headers;
330333
}
331334
}

0 commit comments

Comments
 (0)