|
5 | 5 |
|
6 | 6 | import * as fs from 'fs'; |
7 | 7 | import * as http from 'http'; |
8 | | -import * as path from 'path'; |
9 | 8 | import * as url from 'url'; |
10 | 9 | import * as util from 'util'; |
11 | 10 | import * as cookie from 'cookie'; |
@@ -166,15 +165,6 @@ export class WebClientServer { |
166 | 165 | }; |
167 | 166 | } |
168 | 167 |
|
169 | | - /** |
170 | | - * A convenience method which creates a URL prefixed with a relative path. |
171 | | - */ |
172 | | - private createRequestUrl(req: http.IncomingMessage, parsedUrl: url.UrlWithParsedQuery, pathname: string): URL { |
173 | | - const pathPrefix = getPathPrefix(parsedUrl.pathname!); |
174 | | - const remoteAuthority = this.getRemoteAuthority(req); |
175 | | - return new URL(path.join('/', pathPrefix, pathname), remoteAuthority); |
176 | | - } |
177 | | - |
178 | 168 | private _iconSizes = [192, 512]; |
179 | 169 |
|
180 | 170 | private getRemoteAuthority(req: http.IncomingMessage): URL { |
@@ -346,8 +336,8 @@ export class WebClientServer { |
346 | 336 |
|
347 | 337 | // Endpoints |
348 | 338 | logoutEndpointUrl: './logout', |
349 | | - webEndpointUrl: this.createRequestUrl(req, parsedUrl, '/static').toString(), |
350 | | - webEndpointUrlTemplate: this.createRequestUrl(req, parsedUrl, '/static').toString(), |
| 339 | + webEndpointUrl: './static', |
| 340 | + webEndpointUrlTemplate: './static', |
351 | 341 | webviewContentExternalBaseUrlTemplate: './webview/{{uuid}}/', |
352 | 342 |
|
353 | 343 | updateUrl: './update/check' |
|
0 commit comments