github auth: improve test env detection

cc @RMacfarlane
This commit is contained in:
João Moreno
2021-04-14 08:59:55 +02:00
parent b5dfdbe00f
commit a09d640311

View File

@@ -45,7 +45,7 @@ export class GitHubServer {
constructor(private readonly telemetryReporter: TelemetryReporter) { }
private isTestEnvironment(url: vscode.Uri): boolean {
return url.authority === 'vscode-web-test-playground.azurewebsites.net' || url.authority.startsWith('localhost:');
return /\.azurewebsites\.net$/.test(url.authority) || url.authority.startsWith('localhost:');
}
public async login(scopes: string): Promise<string> {