mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 04:49:35 +00:00
fix isNoCorsEnvironment (#126718)
This commit is contained in:
parent
e0d470c261
commit
c200dc4909
|
@ -50,7 +50,7 @@ export class GitHubServer {
|
|||
// TODO@joaomoreno TODO@RMacfarlane
|
||||
private async isNoCorsEnvironment(): Promise<boolean> {
|
||||
const uri = await vscode.env.asExternalUri(vscode.Uri.parse(`${vscode.env.uriScheme}://vscode.github-authentication/dummy`));
|
||||
return (uri.scheme === 'https' && /^vscode\./.test(uri.authority)) || (uri.scheme === 'http' && /^localhost/.test(uri.authority));
|
||||
return (uri.scheme === 'https' && /^(vscode|github)\./.test(uri.authority)) || (uri.scheme === 'http' && /^localhost/.test(uri.authority));
|
||||
}
|
||||
|
||||
public async login(scopes: string): Promise<string> {
|
||||
|
|
Loading…
Reference in a new issue