chore(env): update production environment variables and enhance proxy handling in Nginx configuration
This commit is contained in:
@@ -14,6 +14,7 @@ use App\Policies\UserPolicy;
|
||||
use App\Policies\WalletPolicy;
|
||||
use App\Policies\WalletTransactionPolicy;
|
||||
use Illuminate\Support\Facades\Gate;
|
||||
use Illuminate\Support\Facades\URL;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class AppServiceProvider extends ServiceProvider
|
||||
@@ -31,6 +32,10 @@ class AppServiceProvider extends ServiceProvider
|
||||
*/
|
||||
public function boot(): void
|
||||
{
|
||||
if (app()->environment('production') || str_starts_with((string) config('app.url'), 'https://')) {
|
||||
URL::forceScheme('https');
|
||||
}
|
||||
|
||||
User::observe(UserObserver::class);
|
||||
|
||||
Gate::policy(User::class, UserPolicy::class);
|
||||
|
||||
Reference in New Issue
Block a user