fix(opencode): accept non-2xx status codes in probe-url to support redirects (#1471)
Co-authored-by: mdbetancourt <mdbetancourt@users.noreply.github.com> Co-authored-by: Bohdan Triapitsyn <artmore@protonmail.com>
This commit is contained in:
committed by
GitHub
co-authored by
mdbetancourt
Bohdan Triapitsyn
parent
a486e76233
commit
85bf7c7563
@@ -620,7 +620,7 @@ export const registerAuthAndAccessRoutes = (app, dependencies) => {
|
||||
redirect: 'manual',
|
||||
signal: AbortSignal.timeout(1500),
|
||||
});
|
||||
return res.json({ ok: response.ok, status: response.status });
|
||||
return res.json({ ok: response.status >= 200 && response.status < 600, status: response.status });
|
||||
} catch (error) {
|
||||
return res.json({ ok: false, error: error?.message || 'Probe failed' });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user