1
0
mirror of https://github.com/Yidadaa/ChatGPT-Next-Web.git synced 2025-11-05 17:46:11 +08:00
Files
.github
.husky
app
api
[provider]
artifacts
config
route.ts
tencent
upstash
webdav
alibaba.ts
anthropic.ts
auth.ts
azure.ts
baidu.ts
bytedance.ts
common.ts
google.ts
iflytek.ts
moonshot.ts
openai.ts
stability.ts
client
components
config
icons
locales
masks
store
styles
utils
command.ts
constant.ts
global.d.ts
layout.tsx
page.tsx
polyfill.ts
typing.ts
utils.ts
docs
public
scripts
src-tauri
.babelrc
.dockerignore
.env.template
.eslintignore
.eslintrc.json
.gitignore
.gitpod.yml
.lintstagedrc.json
.prettierrc.js
CODE_OF_CONDUCT.md
Dockerfile
LICENSE
README.md
README_CN.md
README_JA.md
docker-compose.yml
next.config.mjs
package.json
tsconfig.json
vercel.json
yarn.lock
ChatGPT-Next-Web/app/api/config/route.ts

31 lines
816 B
TypeScript

import { NextResponse } from "next/server";
import { getServerSideConfig } from "../../config/server";
const serverConfig = getServerSideConfig();
// Danger! Do not hard code any secret value here!
// 警告!不要在这里写入任何敏感信息!
const DANGER_CONFIG = {
needCode: serverConfig.needCode,
hideUserApiKey: serverConfig.hideUserApiKey,
disableGPT4: serverConfig.disableGPT4,
hideBalanceQuery: serverConfig.hideBalanceQuery,
disableFastLink: serverConfig.disableFastLink,
customModels: serverConfig.customModels,
defaultModel: serverConfig.defaultModel,
};
declare global {
type DangerConfig = typeof DANGER_CONFIG;
}
async function handle() {
return NextResponse.json(DANGER_CONFIG);
}
export const GET = handle;
export const POST = handle;
export const runtime = "edge";