Skip to content

Commit a3e39e6

Browse files
committed
refactor: updated http-auth dependency
http-auth: added necessary new dependency http-auth-connect that provides the method .connect that got extracted from the original one.
1 parent 57aad3d commit a3e39e6

File tree

3 files changed

+1943
-1842
lines changed

3 files changed

+1943
-1842
lines changed

packages/live-server/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,11 +247,12 @@ LiveServer.start = function (options) {
247247
// Use http-auth if configured
248248
if (htpasswd !== null) {
249249
const auth = require('http-auth');
250+
const authConnect = require('http-auth-connect');
250251
const basic = auth.basic({
251252
realm: 'Please authorize',
252253
file: htpasswd,
253254
});
254-
app.use(auth.connect(basic));
255+
app.use(authConnect(basic));
255256
}
256257

257258
if (cors) {

packages/live-server/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
"cors": "2.8.5",
1919
"event-stream": "3.3.4",
2020
"faye-websocket": "0.11.x",
21-
"http-auth": "3.2.x",
21+
"http-auth": "4.1.x",
22+
"http-auth-connect": "^1.0.5",
2223
"morgan": "1.10.0",
2324
"object-assign": "4.1.1",
2425
"opn": "5.3.0",

0 commit comments

Comments
 (0)