Skip to content

Commit 584ef29

Browse files
authored
fix(frontend): Safarie redirection loop (#625)
* Update HttpRedirectToLogin.ts * Update HttpRedirectToLogin.ts
1 parent 46b1047 commit 584ef29

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Phonebook.Frontend/src/app/shared/interceptors/HttpRedirectToLogin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export class HttpRedirectToLogin implements HttpInterceptor {
2828
}
2929
}),
3030
catchError((err, d) => {
31-
if (err instanceof HttpErrorResponse && err.status == 401) {
31+
if (err instanceof HttpErrorResponse && err.status == 401 && err.headers.has('Location')) {
3232
const location = err.headers.get('Location') as string;
3333
window.location.replace(location);
3434
}

0 commit comments

Comments
 (0)