1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Fixes for base redirect

This commit is contained in:
David Bomba 2023-02-14 11:25:48 +11:00
parent 4670c06b7e
commit a8362762cf

View File

@ -1033,7 +1033,7 @@ class BaseController extends Controller
if ((bool) $this->checkAppSetup() !== false && $account = Account::first()) {
//always redirect invoicing.co to invoicing.co
if(Ninja::isHosted() && (request()->getSchemeAndHttpHost() != 'https://invoicing.co'))
if(Ninja::isHosted() && !in_array(request()->getSchemeAndHttpHost(), ['https://staging.invoicing.co', 'https://invoicing.co']))
return redirect()->secure('https://invoicing.co');
if (config('ninja.require_https') && ! request()->isSecure()) {