fix(desktop): support web_password auth and fix password settings

This commit is contained in:
zhayujie
2026-07-08 20:15:16 +08:00
parent 4d87703e31
commit b98fbae6f6
12 changed files with 290 additions and 21 deletions

View File

@@ -315,7 +315,10 @@ export class PythonBackend extends EventEmitter {
const startedAt = Date.now()
const check = () => {
const req = http.get(`http://127.0.0.1:${this.port}/config`, (res) => {
// Probe the unauthenticated health endpoint, NOT /config: /config
// requires auth once a web_password is set, which would make this poll
// 401 forever and hang startup.
const req = http.get(`http://127.0.0.1:${this.port}/api/health`, (res) => {
if (res.statusCode === 200) {
this.status = 'ready'
this.emit('log', `Backend ready on port ${this.port}`)