Skip to content

Commit 67ee6aa

Browse files
author
James Lees
committed
Use real URL instead of hardcoded localhost
1 parent 8dfed8c commit 67ee6aa

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/safari-client.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import BaseClient from './base-client';
33
import { version as sdkVersion } from '../package.json';
44
import { RegistrationState } from './base-client';
55

6-
const __url = 'https://localhost:8080';
76
const platform = 'safari';
87

98
export class SafariClient extends BaseClient {
@@ -21,7 +20,9 @@ export class SafariClient extends BaseClient {
2120
async _init() {
2221
let { websitePushId } = await this._fetchWebsitePushId();
2322
this._websitePushId = websitePushId;
24-
this._serviceUrl = __url;
23+
this._serviceUrl = `${this._baseURL}/safari_api/v1/instances/${encodeURIComponent(
24+
this.instanceId
25+
)}`;
2526

2627
if (this._deviceId !== null) {
2728
return;

0 commit comments

Comments
 (0)