mirror of
https://code.castopod.org/adaures/castopod
synced 2025-06-05 17:02:01 +00:00
fix(install): redirect to input baseUrl after instance config
install was redirecting to default baseUrl because `redirect->back()` uses the `site_url()` function fix #53
This commit is contained in:
parent
419604c486
commit
2426af7de8
@ -163,13 +163,21 @@ class Install extends Controller
|
|||||||
->with('errors', $this->validator->getErrors());
|
->with('errors', $this->validator->getErrors());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$baseUrl = $this->request->getPost('hostname');
|
||||||
self::writeEnv([
|
self::writeEnv([
|
||||||
'app.baseURL' => $this->request->getPost('hostname'),
|
'app.baseURL' => $baseUrl,
|
||||||
'app.adminGateway' => $this->request->getPost('admin_gateway'),
|
'app.adminGateway' => $this->request->getPost('admin_gateway'),
|
||||||
'app.authGateway' => $this->request->getPost('auth_gateway'),
|
'app.authGateway' => $this->request->getPost('auth_gateway'),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
return redirect()->back();
|
helper('text');
|
||||||
|
|
||||||
|
// redirect to full install url with new baseUrl input
|
||||||
|
return redirect(0)->to(
|
||||||
|
reduce_double_slashes(
|
||||||
|
$baseUrl . '/' . config('App')->installGateway
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function databaseConfig()
|
public function databaseConfig()
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
'id' => 'hostname',
|
'id' => 'hostname',
|
||||||
'name' => 'hostname',
|
'name' => 'hostname',
|
||||||
'class' => 'form-input mb-4',
|
'class' => 'form-input mb-4',
|
||||||
'value' => old('hostname', set_value(host_url(), config('App')->baseURL)),
|
'value' => old('hostname', host_url() ?? config('App')->baseURL),
|
||||||
'required' => 'required',
|
'required' => 'required',
|
||||||
]) ?>
|
]) ?>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user