mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-10 00:34:50 +00:00
Fix wrong url scheme in sudo mode when using reverse proxy
This commit is contained in:
parent
59e818cbbd
commit
593420d84d
1 changed files with 6 additions and 0 deletions
|
@ -466,6 +466,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()
|
||||
|
|
Loading…
Reference in a new issue