mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Wind back some changes for react fallback routes
This commit is contained in:
parent
1d6b7d3b55
commit
050079b76a
@ -1000,42 +1000,6 @@ class BaseController extends Controller
|
||||
return redirect('/setup');
|
||||
}
|
||||
|
||||
public function reactCatch()
|
||||
{
|
||||
|
||||
if ((bool) $this->checkAppSetup() !== false && $account = Account::first()) {
|
||||
if (config('ninja.require_https') && ! request()->isSecure()) {
|
||||
return redirect()->secure(request()->getRequestUri());
|
||||
}
|
||||
|
||||
$data = [];
|
||||
|
||||
//pass report errors bool to front end
|
||||
$data['report_errors'] = Ninja::isSelfHost() ? $account->report_errors : true;
|
||||
|
||||
//pass referral code to front end
|
||||
$data['rc'] = request()->has('rc') ? request()->input('rc') : '';
|
||||
$data['build'] = request()->has('build') ? request()->input('build') : '';
|
||||
$data['login'] = request()->has('login') ? request()->input('login') : 'false';
|
||||
$data['signup'] = request()->has('signup') ? request()->input('signup') : 'false';
|
||||
|
||||
$data['user_agent'] = request()->server('HTTP_USER_AGENT');
|
||||
|
||||
$data['path'] = $this->setBuild();
|
||||
|
||||
$this->buildCache();
|
||||
|
||||
if (Ninja::isSelfHost() && $account->set_react_as_default_ap) {
|
||||
return view('react.index', $data);
|
||||
} else {
|
||||
abort('page not found', 404);
|
||||
}
|
||||
}
|
||||
|
||||
return redirect('/setup');
|
||||
}
|
||||
|
||||
|
||||
private function setBuild()
|
||||
{
|
||||
$build = '';
|
||||
|
@ -58,6 +58,4 @@ Route::get('yodlee/onboard/{token}', [YodleeController::class, 'auth'])->name('y
|
||||
Route::get('checkout/3ds_redirect/{company_key}/{company_gateway_id}/{hash}', [Checkout3dsController::class, 'index'])->middleware('domain_db')->name('checkout.3ds_redirect');
|
||||
Route::get('mollie/3ds_redirect/{company_key}/{company_gateway_id}/{hash}', [Mollie3dsController::class, 'index'])->middleware('domain_db')->name('mollie.3ds_redirect');
|
||||
Route::get('gocardless/ibp_redirect/{company_key}/{company_gateway_id}/{hash}', [GoCardlessController::class, 'ibpRedirect'])->middleware('domain_db')->name('gocardless.ibp_redirect');
|
||||
Route::get('.well-known/apple-developer-merchantid-domain-association', [ApplePayDomainController::class, 'showAppleMerchantId']);
|
||||
|
||||
Route::fallback([BaseController::class, 'reactCatch']);
|
||||
Route::get('.well-known/apple-developer-merchantid-domain-association', [ApplePayDomainController::class, 'showAppleMerchantId']);
|
Loading…
x
Reference in New Issue
Block a user