mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-16 11:40:48 +08:00
Speed up uds-auth login: paint badge first, lazy /api/me.
Skip startup /api/me until QR load, stop blocking me on workspace provision, and register the footer login entry before heavy ACL gates so login appears immediately. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
1c461285fc
commit
81ff8eb19f
4 changed files with 104 additions and 134 deletions
|
|
@ -21,7 +21,7 @@ export function directRequest(url, opts = {}) {
|
|||
if (body && headers['Content-Length'] == null && headers['content-length'] == null) {
|
||||
headers['Content-Length'] = body.length
|
||||
}
|
||||
const timeoutMs = opts.timeoutMs ?? 8000
|
||||
const timeoutMs = opts.timeoutMs ?? 3000
|
||||
|
||||
// Fresh Agent — never inherit globalAgent (often patched by proxy bootstraps).
|
||||
const agent = new lib.Agent({ keepAlive: false })
|
||||
|
|
@ -71,7 +71,7 @@ export async function searchUserByEmpNoToken({
|
|||
empNoHeader = 'X-Emp-No',
|
||||
authValueHeader = 'X-Auth-Value',
|
||||
origin,
|
||||
timeoutMs = 8000,
|
||||
timeoutMs = 3000,
|
||||
}) {
|
||||
if (!userSearchUrl || !empNo || !token) {
|
||||
return { ok: false, reason: 'missing_args' }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue