Skip to content

Commit cff9144

Browse files
committed
More proxy config
1 parent 2139da7 commit cff9144

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

jccp/bootstrap/app.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
use Illuminate\Foundation\Application;
44
use Illuminate\Foundation\Configuration\Exceptions;
55
use Illuminate\Foundation\Configuration\Middleware;
6+
use Illuminate\Http\Request;
67

78
return Application::configure(basePath: dirname(__DIR__))
89
->withRouting(
@@ -11,7 +12,12 @@
1112
health: '/up',
1213
)
1314
->withMiddleware(function (Middleware $middleware) {
14-
$middleware->trustProxies(at: '*');
15+
$middleware->trustProxies(at: '*', headers:
16+
Request::HEADER_X_FORWARDED_FOR |
17+
Request::HEADER_X_FORWARDED_HOST |
18+
Request::HEADER_X_FORWARDED_PORT |
19+
Request::HEADER_X_FORWARDED_PROTO
20+
);
1521
})
1622
->withExceptions(function (Exceptions $exceptions) {
1723
//

0 commit comments

Comments
 (0)