fix force https always

This commit is contained in:
Alexis Gousseau 2023-06-23 13:30:45 +02:00
parent 97e64f3180
commit c6c2dec647

View file

@ -36,14 +36,11 @@ class AppServiceProvider extends ServiceProvider
JsonResource::withoutWrapping();
// * LOCAL HTTPS FIX.
if (!in_array(config('app.env'), ['local', 'testing'])) {
URL::forceScheme('https');
}
URL::forceScheme('https');
// * HA PROXY FIX.
App::singleton('clientIp', function () {
if (
config('app.env') === 'local'
) {
if (config('app.env') === 'local') {
return request()->getClientIp();
} else {
return request()->server('HTTP_X_FORWARDED_FOR') ??