feat: close #663 allow disable user api key input

This commit is contained in:
Yidadaa
2023-05-03 23:49:33 +08:00
parent b1ea26467d
commit 074bd9f045
8 changed files with 57 additions and 23 deletions

View File

@@ -8,6 +8,7 @@ const serverConfig = getServerSideConfig();
// 警告!不要在这里写入任何敏感信息!
const DANGER_CONFIG = {
needCode: serverConfig.needCode,
hideUserApiKey: serverConfig.hideUserApiKey,
};
declare global {
@@ -15,9 +16,7 @@ declare global {
}
export async function POST() {
return NextResponse.json({
needCode: serverConfig.needCode,
});
return NextResponse.json(DANGER_CONFIG);
}
export const runtime = "edge";