mirror of
https://github.com/Yidadaa/ChatGPT-Next-Web.git
synced 2025-09-02 05:13:06 +08:00
Compare commits
27 Commits
feat-redes
...
v2.12.4
Author | SHA1 | Date | |
---|---|---|---|
|
b972a0d081 | ||
|
20749355da | ||
|
dad122199a | ||
|
9fb8fbcc65 | ||
|
78e7ea72dc | ||
|
4640060891 | ||
|
9b0a705055 | ||
|
163fc9e3a3 | ||
|
b6735bffe4 | ||
|
1d8fd480ca | ||
|
da2e2372aa | ||
|
bf3bc3c7e9 | ||
|
38664487a0 | ||
|
de1111286c | ||
|
d89a12aa05 | ||
|
754acd7c26 | ||
|
c3e2f3b714 | ||
|
22ef3d3a46 | ||
|
7f3516f44f | ||
|
bfdb47a7ed | ||
|
01c9dbc1fd | ||
|
e58cb2b0db | ||
|
cf29a8f2c8 | ||
|
d411159124 | ||
|
5bf402710f | ||
|
2053db4cfc | ||
|
754303e7c7 |
@@ -58,7 +58,7 @@ CMD if [ -n "$PROXY_URL" ]; then \
|
|||||||
echo "[ProxyList]" >> $conf; \
|
echo "[ProxyList]" >> $conf; \
|
||||||
echo "$protocol $host $port" >> $conf; \
|
echo "$protocol $host $port" >> $conf; \
|
||||||
cat /etc/proxychains.conf; \
|
cat /etc/proxychains.conf; \
|
||||||
proxychains -f $conf node server.js; \
|
proxychains -f $conf node server.js --host 0.0.0.0; \
|
||||||
else \
|
else \
|
||||||
node server.js; \
|
node server.js; \
|
||||||
fi
|
fi
|
||||||
|
2
LICENSE
2
LICENSE
@@ -1,6 +1,6 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2023 Zhang Yifei
|
Copyright (c) 2023-2024 Zhang Yifei
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
@@ -9,6 +9,14 @@ const mergedAllowedWebDavEndpoints = [
|
|||||||
...config.allowedWebDevEndpoints,
|
...config.allowedWebDevEndpoints,
|
||||||
].filter((domain) => Boolean(domain.trim()));
|
].filter((domain) => Boolean(domain.trim()));
|
||||||
|
|
||||||
|
const normalizeUrl = (url: string) => {
|
||||||
|
try {
|
||||||
|
return new URL(url);
|
||||||
|
} catch (err) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
async function handle(
|
async function handle(
|
||||||
req: NextRequest,
|
req: NextRequest,
|
||||||
{ params }: { params: { path: string[] } },
|
{ params }: { params: { path: string[] } },
|
||||||
@@ -24,9 +32,15 @@ async function handle(
|
|||||||
|
|
||||||
// Validate the endpoint to prevent potential SSRF attacks
|
// Validate the endpoint to prevent potential SSRF attacks
|
||||||
if (
|
if (
|
||||||
!mergedAllowedWebDavEndpoints.some(
|
!endpoint ||
|
||||||
(allowedEndpoint) => endpoint?.startsWith(allowedEndpoint),
|
!mergedAllowedWebDavEndpoints.some((allowedEndpoint) => {
|
||||||
)
|
const normalizedAllowedEndpoint = normalizeUrl(allowedEndpoint);
|
||||||
|
const normalizedEndpoint = normalizeUrl(endpoint as string);
|
||||||
|
|
||||||
|
return normalizedEndpoint &&
|
||||||
|
normalizedEndpoint.hostname === normalizedAllowedEndpoint?.hostname &&
|
||||||
|
normalizedEndpoint.pathname.startsWith(normalizedAllowedEndpoint.pathname);
|
||||||
|
})
|
||||||
) {
|
) {
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
{
|
{
|
||||||
|
@@ -149,7 +149,7 @@ const openaiModels = [
|
|||||||
"gpt-4o",
|
"gpt-4o",
|
||||||
"gpt-4o-2024-05-13",
|
"gpt-4o-2024-05-13",
|
||||||
"gpt-4-vision-preview",
|
"gpt-4-vision-preview",
|
||||||
"gpt-4-turbo-2024-04-09"
|
"gpt-4-turbo-2024-04-09",
|
||||||
];
|
];
|
||||||
|
|
||||||
const googleModels = [
|
const googleModels = [
|
||||||
@@ -166,6 +166,7 @@ const anthropicModels = [
|
|||||||
"claude-3-sonnet-20240229",
|
"claude-3-sonnet-20240229",
|
||||||
"claude-3-opus-20240229",
|
"claude-3-opus-20240229",
|
||||||
"claude-3-haiku-20240307",
|
"claude-3-haiku-20240307",
|
||||||
|
"claude-3-5-sonnet-20240620",
|
||||||
];
|
];
|
||||||
|
|
||||||
export const DEFAULT_MODELS = [
|
export const DEFAULT_MODELS = [
|
||||||
@@ -207,6 +208,7 @@ export const internalAllowedWebDavEndpoints = [
|
|||||||
"https://dav.dropdav.com/",
|
"https://dav.dropdav.com/",
|
||||||
"https://dav.box.com/dav",
|
"https://dav.box.com/dav",
|
||||||
"https://nanao.teracloud.jp/dav/",
|
"https://nanao.teracloud.jp/dav/",
|
||||||
|
"https://bora.teracloud.jp/dav/",
|
||||||
"https://webdav.4shared.com/",
|
"https://webdav.4shared.com/",
|
||||||
"https://dav.idrivesync.com",
|
"https://dav.idrivesync.com",
|
||||||
"https://webdav.yandex.com",
|
"https://webdav.yandex.com",
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
7. 在 "Build Settings" 中,选择 "Framework presets" 选项并选择 "Next.js"。
|
7. 在 "Build Settings" 中,选择 "Framework presets" 选项并选择 "Next.js"。
|
||||||
8. 由于 node:buffer 的 bug,暂时不要使用默认的 "Build command"。请使用以下命令:
|
8. 由于 node:buffer 的 bug,暂时不要使用默认的 "Build command"。请使用以下命令:
|
||||||
```
|
```
|
||||||
npx @cloudflare/next-on-pages@1.5.0
|
npx @cloudflare/next-on-pages --experimental-minify
|
||||||
```
|
```
|
||||||
9. 对于 "Build output directory",使用默认值并且不要修改。
|
9. 对于 "Build output directory",使用默认值并且不要修改。
|
||||||
10. 不要修改 "Root Directory"。
|
10. 不要修改 "Root Directory"。
|
||||||
|
@@ -12,7 +12,9 @@ Bifurca el proyecto en Github, luego inicia sesión en dash.cloudflare.com y ve
|
|||||||
6. Para "Nombre del proyecto" y "Rama de producción", puede utilizar los valores predeterminados o cambiarlos según sea necesario.
|
6. Para "Nombre del proyecto" y "Rama de producción", puede utilizar los valores predeterminados o cambiarlos según sea necesario.
|
||||||
7. En Configuración de compilación, seleccione la opción Ajustes preestablecidos de Framework y seleccione Siguiente.js.
|
7. En Configuración de compilación, seleccione la opción Ajustes preestablecidos de Framework y seleccione Siguiente.js.
|
||||||
8. Debido a los errores de node:buffer, no use el "comando Construir" predeterminado por ahora. Utilice el siguiente comando:
|
8. Debido a los errores de node:buffer, no use el "comando Construir" predeterminado por ahora. Utilice el siguiente comando:
|
||||||
npx https://prerelease-registry.devprod.cloudflare.dev/next-on-pages/runs/4930842298/npm-package-next-on-pages-230 --experimental-minify
|
```
|
||||||
|
npx @cloudflare/next-on-pages --experimental-minify
|
||||||
|
```
|
||||||
9. Para "Generar directorio de salida", utilice los valores predeterminados y no los modifique.
|
9. Para "Generar directorio de salida", utilice los valores predeterminados y no los modifique.
|
||||||
10. No modifique el "Directorio raíz".
|
10. No modifique el "Directorio raíz".
|
||||||
11. Para "Variables de entorno", haga clic en ">" y luego haga clic en "Agregar variable". Rellene la siguiente información:
|
11. Para "Variables de entorno", haga clic en ">" y luego haga clic en "Agregar variable". Rellene la siguiente información:
|
||||||
|
@@ -12,7 +12,7 @@ GitHub でこのプロジェクトをフォークし、dash.cloudflare.com に
|
|||||||
7. "Build Settings" で、"Framework presets" オプションを選択し、"Next.js" を選択します。
|
7. "Build Settings" で、"Framework presets" オプションを選択し、"Next.js" を選択します。
|
||||||
8. node:buffer のバグのため、デフォルトの "Build command" は使用しないでください。代わりに、以下のコマンドを使用してください:
|
8. node:buffer のバグのため、デフォルトの "Build command" は使用しないでください。代わりに、以下のコマンドを使用してください:
|
||||||
```
|
```
|
||||||
npx https://prerelease-registry.devprod.cloudflare.dev/next-on-pages/runs/4930842298/npm-package-next-on-pages-230 --experimental-minify
|
npx @cloudflare/next-on-pages --experimental-minify
|
||||||
```
|
```
|
||||||
9. "Build output directory" はデフォルト値を使用し、変更しない。
|
9. "Build output directory" はデフォルト値を使用し、変更しない。
|
||||||
10. "Root Directory" を変更しない。
|
10. "Root Directory" を変更しない。
|
||||||
|
@@ -11,8 +11,8 @@
|
|||||||
6. "프로젝트 이름" 및 "프로덕션 브랜치"의 기본값을 사용하거나 필요에 따라 변경합니다.
|
6. "프로젝트 이름" 및 "프로덕션 브랜치"의 기본값을 사용하거나 필요에 따라 변경합니다.
|
||||||
7. "빌드 설정"에서 "프레임워크 프리셋" 옵션을 선택하고 "Next.js"를 선택합니다.
|
7. "빌드 설정"에서 "프레임워크 프리셋" 옵션을 선택하고 "Next.js"를 선택합니다.
|
||||||
8. node:buffer 버그로 인해 지금은 기본 "빌드 명령어"를 사용하지 마세요. 다음 명령을 사용하세요:
|
8. node:buffer 버그로 인해 지금은 기본 "빌드 명령어"를 사용하지 마세요. 다음 명령을 사용하세요:
|
||||||
``
|
```
|
||||||
npx https://prerelease-registry.devprod.cloudflare.dev/next-on-pages/runs/4930842298/npm-package-next-on-pages-230 --experimental- minify
|
npx @cloudflare/next-on-pages --experimental-minify
|
||||||
```
|
```
|
||||||
9. "빌드 출력 디렉토리"의 경우 기본값을 사용하고 수정하지 마십시오.
|
9. "빌드 출력 디렉토리"의 경우 기본값을 사용하고 수정하지 마십시오.
|
||||||
10. "루트 디렉토리"는 수정하지 마십시오.
|
10. "루트 디렉토리"는 수정하지 마십시오.
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
},
|
},
|
||||||
"package": {
|
"package": {
|
||||||
"productName": "NextChat",
|
"productName": "NextChat",
|
||||||
"version": "2.12.3"
|
"version": "2.12.4"
|
||||||
},
|
},
|
||||||
"tauri": {
|
"tauri": {
|
||||||
"allowlist": {
|
"allowlist": {
|
||||||
@@ -112,4 +112,4 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
Reference in New Issue
Block a user