http vs https handling on swagger

This commit is contained in:
Brian Fertig 2026-08-06 12:48:42 -06:00
parent 76ccc53474
commit 7eb2751cd4
1 changed files with 7 additions and 0 deletions

View File

@ -18,6 +18,13 @@ return Application::configure(basePath: dirname(__DIR__))
$middleware->redirectGuestsTo('/login');
$middleware->redirectUsersTo('/');
// The app container only ever serves plain HTTP; TLS is terminated by an
// upstream reverse proxy/load balancer. Without trusting that proxy,
// Laravel ignores its X-Forwarded-Proto header and generates http://
// URLs (e.g. via asset()) even when the site is loaded over https://,
// which trips browsers' mixed-content blocking (seen on /api/docs).
$middleware->trustProxies(at: '*');
})
->withExceptions(function (Exceptions $exceptions): void {
//