diff --git a/app/Http/Controllers/AccountController.php b/app/Http/Controllers/AccountController.php index 9e1c5e73..3ed1cd40 100644 --- a/app/Http/Controllers/AccountController.php +++ b/app/Http/Controllers/AccountController.php @@ -479,6 +479,12 @@ class AccountController extends Controller if($trustDevice == true) { $request->session()->put('sudoTrustDevice', 1); } + + //Fix wrong scheme when using reverse proxy + if(!str_contains($next, 'https') && config('instance.force_https_urls', true)) { + $next = Str::of($next)->replace('http', 'https')->toString(); + } + return redirect($next); } else { return redirect()