Skip to content

Commit

Permalink
Fix force https for some reverse proxies, Add url and path to debug e…
Browse files Browse the repository at this point in the history
…ndpoint
  • Loading branch information
korridor committed Nov 12, 2024
1 parent 31014c1 commit 64b41e3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/Http/Controllers/Web/HealthCheckController.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ public function debug(Request $request): JsonResponse
return response()
->json([
'ip_address' => $ipAddress,
'url' => $request->url(),
'path' => $request->path(),
'hostname' => $hostname,
'timestamp' => Carbon::now()->timestamp,
'date_time_utc' => Carbon::now('UTC')->toDateTimeString(),
Expand Down
1 change: 1 addition & 0 deletions app/Providers/AppServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ public function boot(): void
if (config('app.force_https', false)) {
URL::forceScheme('https');
request()->server->set('HTTPS', 'on');
request()->server->set('X-Forward-Proto', 'https');
}

$this->app->scoped(PermissionStore::class, function (Application $app): PermissionStore {
Expand Down

0 comments on commit 64b41e3

Please sign in to comment.