kopia lustrzana https://github.com/pixelfed/pixelfed
Merge pull request #3890 from vanlueckn/feat-fix-sudo-mode-url-scheme
Fix wrong url scheme in sudo mode when using reverse proxypull/4223/head
commit
e68ec03cea
|
@ -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()
|
||||
|
|
Ładowanie…
Reference in New Issue