From 564bf3261390b2fad285168c500f27d3322c9d9b Mon Sep 17 00:00:00 2001 From: "J. Maurice" Date: Mon, 22 Jul 2019 21:30:52 +0900 Subject: [PATCH] Change hard-coded backend websocket URI to document.location.hostname --- frontend/src/app/services/api.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/app/services/api.service.ts b/frontend/src/app/services/api.service.ts index ee7d3a330..6ca66def1 100644 --- a/frontend/src/app/services/api.service.ts +++ b/frontend/src/app/services/api.service.ts @@ -5,7 +5,7 @@ import { HttpClient, HttpParams } from '@angular/common/http'; import { IMempoolDefaultResponse, IMempoolStats, IBlockTransaction } from '../blockchain/interfaces'; import { Observable } from 'rxjs'; -const WEB_SOCKET_URL = 'ws://localhost:8999'; +const WEB_SOCKET_URL = 'ws://' + document.location.hostname + ':8999'; const API_BASE_URL = '/api/v1'; @Injectable({