Skip to content

Commit f534f90

Browse files
committed
Fix force HTTPS config
1 parent 0290013 commit f534f90

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

app/Providers/AppServiceProvider.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
use Illuminate\Database\Eloquent\Model;
2929
use Illuminate\Database\Eloquent\Relations\Relation;
3030
use Illuminate\Foundation\Application;
31-
use Illuminate\Support\Facades\App;
3231
use Illuminate\Support\Facades\Route;
3332
use Illuminate\Support\Facades\URL;
3433
use Illuminate\Support\ServiceProvider;
@@ -91,9 +90,9 @@ public function boot(): void
9190
);
9291
});
9392

94-
if (config('app.force_https', false) || App::isProduction()) {
93+
if (config('app.force_https', false)) {
9594
URL::forceScheme('https');
96-
request()->server->set('HTTPS', request()->header('X-Forwarded-Proto', 'https') === 'https' ? 'on' : 'off');
95+
request()->server->set('HTTPS', 'on');
9796
}
9897

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

0 commit comments

Comments
 (0)