mirror of
https://github.com/Microsoft/vscode
synced 2024-08-28 05:19:39 +00:00
Move authServer to fix relative paths issue
This commit is contained in:
parent
e1dce24837
commit
7725bf1bcc
|
@ -22,6 +22,7 @@ module.exports = withBrowserDefaults({
|
|||
resolve: {
|
||||
alias: {
|
||||
'./env/node': path.resolve(__dirname, 'src/env/browser'),
|
||||
'./authServer': path.resolve(__dirname, 'src/env/browser/authServer'),
|
||||
'buffer': path.resolve(__dirname, 'node_modules/buffer/index.js'),
|
||||
'node-fetch': path.resolve(__dirname, 'node_modules/node-fetch/browser.js'),
|
||||
'randombytes': path.resolve(__dirname, 'node_modules/randombytes/browser.js'),
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import * as randomBytes from 'randombytes';
|
||||
import * as querystring from 'querystring';
|
||||
import * as vscode from 'vscode';
|
||||
import { createServer, startServer } from './env/node/authServer';
|
||||
import { createServer, startServer } from './authServer';
|
||||
|
||||
import { v4 as uuid } from 'uuid';
|
||||
import { keychain } from './keychain';
|
||||
|
|
|
@ -130,10 +130,10 @@ export function createServer(nonce: string) {
|
|||
}
|
||||
break;
|
||||
case '/':
|
||||
sendFile(res, path.join(__dirname, '../../../media/auth.html'), 'text/html; charset=utf-8');
|
||||
sendFile(res, path.join(__dirname, '../media/auth.html'), 'text/html; charset=utf-8');
|
||||
break;
|
||||
case '/auth.css':
|
||||
sendFile(res, path.join(__dirname, '../../../media/auth.css'), 'text/css; charset=utf-8');
|
||||
sendFile(res, path.join(__dirname, '../media/auth.css'), 'text/css; charset=utf-8');
|
||||
break;
|
||||
case '/callback':
|
||||
deferredCode.resolve(callback(nonce, reqUrl)
|
Loading…
Reference in a new issue