Skip to content

Commit

Permalink
fixed nginx server port issue
Browse files Browse the repository at this point in the history
  • Loading branch information
MonikaSharma06 committed Aug 19, 2021
1 parent deadb4f commit 436c2fa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ export function pingServiceFactory(ping: PingService, sharedService: SharedServi
sharedService.isServiceUp.next(true);
})
.catch(error => {
// Set isService to true, if response status code is non zero and not undefined
if (error && error.status && error.status !== 0) {
// Set isService to true, if response status code is not undefined and not 0 & not 404
if (error && error.status && !(error.status === 0 || error.status === 404)) {
sharedService.isServiceUp.next(true);
} else {
sharedService.isServiceUp.next(false);
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/layout/navbar/navbar.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ export class NavbarComponent implements OnInit, AfterViewInit, OnDestroy {
}
// If response code is non zero and not undefined, set isAlive and isAuth to true,
// else set service to down and pingInfo accordingly
if (error && error.status && error.status !== 0) {
if (error && error.status && !(error.status === 0 || error.status === 404)) {
this.pingInfo.isAlive = true;
this.pingInfo.isAuth = true;
} else {
Expand Down

0 comments on commit 436c2fa

Please sign in to comment.