fix: login dialog not working in download-managers

Massimo Melina committed Jan 6, 2023 at 12:43 UTC 89a61b03cecd59a58256670698f45a66372562f3
1 file changed +1 -1
src/middlewares.ts
+1 -1
@@ -82,7 +82,7 @@ export const serveGuiAndSharedFiles: Koa.Middleware = async (ctx, next) => {
82 return
83 const browserDetected = ctx.get('Upgrade-Insecure-Requests') || ctx.get('Sec-Fetch-Mode') // ugh, heuristics
84 if (!browserDetected) // we don't want to trigger basic authentication on browsers, it's meant for download managers only
85 - ctx.set('WWW-Authenticate', 'Basic') // we support basic authentication
85 + return ctx.set('WWW-Authenticate', 'Basic') // we support basic authentication
86 ctx.state.serveApp = true
87 return serveFrontendFiles(ctx, next)
88 }