forked from XiaoMo/ChatGPT-Next-Web
Merge pull request #2865 from Yidadaa/bugfix-0919
This commit is contained in:
commit
2c4626709c
@ -26,13 +26,18 @@ async function handle(
|
|||||||
duplex: "half",
|
duplex: "half",
|
||||||
};
|
};
|
||||||
|
|
||||||
console.log("[Any Proxy]", targetUrl);
|
const fetchResult = await fetch(targetUrl, fetchOptions);
|
||||||
|
|
||||||
const fetchResult = fetch(targetUrl, fetchOptions);
|
console.log("[Any Proxy]", targetUrl, {
|
||||||
|
status: fetchResult.status,
|
||||||
|
statusText: fetchResult.statusText,
|
||||||
|
});
|
||||||
|
|
||||||
return fetchResult;
|
return fetchResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const POST = handle;
|
export const POST = handle;
|
||||||
|
export const GET = handle;
|
||||||
|
export const OPTIONS = handle;
|
||||||
|
|
||||||
export const runtime = "edge";
|
export const runtime = "nodejs";
|
||||||
|
@ -275,7 +275,7 @@ function CheckButton() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<IconButton
|
<IconButton
|
||||||
text="检查可用性"
|
text={Locale.Settings.Sync.Config.Modal.Check}
|
||||||
bordered
|
bordered
|
||||||
onClick={check}
|
onClick={check}
|
||||||
icon={
|
icon={
|
||||||
|
@ -187,6 +187,7 @@ const cn = {
|
|||||||
Config: {
|
Config: {
|
||||||
Modal: {
|
Modal: {
|
||||||
Title: "配置云同步",
|
Title: "配置云同步",
|
||||||
|
Check: "检查可用性",
|
||||||
},
|
},
|
||||||
SyncType: {
|
SyncType: {
|
||||||
Title: "同步类型",
|
Title: "同步类型",
|
||||||
|
@ -189,6 +189,7 @@ const en: LocaleType = {
|
|||||||
Config: {
|
Config: {
|
||||||
Modal: {
|
Modal: {
|
||||||
Title: "Config Sync",
|
Title: "Config Sync",
|
||||||
|
Check: "Check Connection",
|
||||||
},
|
},
|
||||||
SyncType: {
|
SyncType: {
|
||||||
Title: "Sync Type",
|
Title: "Sync Type",
|
||||||
|
@ -23,7 +23,7 @@ export function createWebDavClient(store: SyncStore) {
|
|||||||
|
|
||||||
console.log("[WebDav] check", res.status, res.statusText);
|
console.log("[WebDav] check", res.status, res.statusText);
|
||||||
|
|
||||||
return [201, 200, 404].includes(res.status);
|
return [201, 200, 404, 401].includes(res.status);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error("[WebDav] failed to check", e);
|
console.error("[WebDav] failed to check", e);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user