chore(env): update production environment variables and enhance proxy handling in Nginx configuration

This commit is contained in:
2026-06-07 22:20:03 +03:30
parent d1d42b38d1
commit ca43502ffb
5 changed files with 19 additions and 4 deletions

View File

@@ -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);