+ client: use relative URLs for login/logout
This commit is contained in:
parent
3166607540
commit
1b1338fed6
|
@ -11,7 +11,8 @@ export const processLogin = values => async (dispatch) => {
|
||||||
dispatch(processLoginRequest());
|
dispatch(processLoginRequest());
|
||||||
try {
|
try {
|
||||||
await apiClient.login(values);
|
await apiClient.login(values);
|
||||||
window.location.replace(window.location.origin);
|
const dashboardUrl = window.location.origin + window.location.pathname.replace('/login.html', '/');
|
||||||
|
window.location.replace(dashboardUrl);
|
||||||
dispatch(processLoginSuccess());
|
dispatch(processLoginSuccess());
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
dispatch(addErrorToast({ error }));
|
dispatch(addErrorToast({ error }));
|
||||||
|
|
|
@ -61,9 +61,9 @@ class Header extends Component {
|
||||||
<div className="header__column">
|
<div className="header__column">
|
||||||
<div className="header__right">
|
<div className="header__right">
|
||||||
{!dashboard.processingProfile && dashboard.name &&
|
{!dashboard.processingProfile && dashboard.name &&
|
||||||
<a href="/control/logout" className="btn btn-sm btn-outline-secondary">
|
<a href="control/logout" className="btn btn-sm btn-outline-secondary">
|
||||||
<Trans>sign_out</Trans>
|
<Trans>sign_out</Trans>
|
||||||
</a>
|
</a>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue