Skip to content

Commit

Permalink
Fixing a mismatch in default config for webviews
Browse files Browse the repository at this point in the history
  • Loading branch information
mjbvz committed Sep 17, 2019
1 parent 5fc4fe2 commit db358b5
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,16 +181,17 @@ export class BrowserWorkbenchEnvironmentService implements IWorkbenchEnvironment

get webviewExternalEndpoint(): string {
// TODO: get fallback from product.json
return this.options.webviewEndpoint || 'https://{{uuid}}.vscode-webview-test.com';
return (this.options.webviewEndpoint || 'https://{{uuid}}.vscode-webview-test.com/{{commit}}')
.replace('{{commit}}', product.commit || '211fa02efe8c041fd7baa8ec3dce199d5185aa44');
}

get webviewResourceRoot(): string {
return `${this.webviewExternalEndpoint}/{{commit}}/vscode-resource{{resource}}`
.replace('{{commit}}', product.commit || '211fa02efe8c041fd7baa8ec3dce199d5185aa44');
return `${this.webviewExternalEndpoint}/vscode-resource{{resource}}`;
}

get webviewCspSource(): string {
return this.options.webviewEndpoint || `https://*.vscode-webview-test.com`;
return this.webviewExternalEndpoint
.replace('{{uuid}}', '*');
}
}

Expand Down

0 comments on commit db358b5

Please sign in to comment.