Dynamic api url

This commit is contained in:
simon987
2019-02-24 17:47:37 -05:00
parent 397805f915
commit 00567ce72b
2 changed files with 2 additions and 2 deletions

View File

@@ -6,7 +6,7 @@ import {Credentials} from "./models/credentials";
@Injectable()
export class ApiService {
public url: string = "http://localhost/api";
public url: string = window.location.protocol + "//" + window.location.hostname + "/api";
private options: {
withCredentials: true,
responseType: "json"