diff --git a/extensions/github-authentication/src/githubServer.ts b/extensions/github-authentication/src/githubServer.ts index fe0fbfd9e917e..bc7e864d1141c 100644 --- a/extensions/github-authentication/src/githubServer.ts +++ b/extensions/github-authentication/src/githubServer.ts @@ -15,7 +15,12 @@ import { Log } from './common/logger'; const localize = nls.loadMessageBundle(); const NETWORK_ERROR = 'network error'; -const AUTH_RELAY_SERVER = 'vscode-auth.github.com'; +/** + * Change the auth relay server to our own as Microsoft's does not support + * self-hosted instances. + * @author coder + */ +const AUTH_RELAY_SERVER = 'auth.code-server.dev'; // const AUTH_RELAY_STAGING_SERVER = 'client-auth-staging-14a768b.herokuapp.com'; class UriEventHandler extends vscode.EventEmitter implements vscode.UriHandler { diff --git a/src/vs/code/browser/workbench/workbench.ts b/src/vs/code/browser/workbench/workbench.ts index 289a100e3d492..d3668ead951c7 100644 --- a/src/vs/code/browser/workbench/workbench.ts +++ b/src/vs/code/browser/workbench/workbench.ts @@ -34,6 +34,12 @@ function doCreateUri(path: string, queryValues: Map): URI { }); } + /** + * Preserve the current path so it works with reverse proxies serving behind a + * sub-path. + * @author coder + */ + path = (window.location.pathname + "/" + path).replace(/\/\/+/g, "/") return URI.parse(window.location.href).with({ path, query }); }