fix: force HTTPS scheme in all environments

Previously HTTPS was only enforced in production, which could lead to insecure URLs in other environments like staging. This change ensures consistent URL generation across all environments.
This commit is contained in:
Jp
2026-02-11 05:41:22 +08:00
parent 7fa8b75b29
commit ee65bdfb31

View File

@@ -23,9 +23,7 @@ class AppServiceProvider extends ServiceProvider
*/ */
public function boot(): void public function boot(): void
{ {
if ($this->app->environment('production')) {
URL::forceScheme('https'); URL::forceScheme('https');
}
Gate::before(function ($user, $ability) { Gate::before(function ($user, $ability) {
return $user->hasRole('super_admin') ? true : null; return $user->hasRole('super_admin') ? true : null;