mirror of
https://github.com/labring/FastGPT.git
synced 2025-10-15 23:55:36 +00:00
v4.6.6-fix (#676)
This commit is contained in:
@@ -11,7 +11,7 @@ export async function authOpenApiKey({ apikey }: { apikey: string }) {
|
||||
return Promise.reject(ERROR_ENUM.unAuthApiKey);
|
||||
}
|
||||
try {
|
||||
const openApi = await MongoOpenApi.findOne({ apiKey: apikey });
|
||||
const openApi = await MongoOpenApi.findOne({ apiKey: apikey.trim() });
|
||||
if (!openApi) {
|
||||
return Promise.reject(ERROR_ENUM.unAuthApiKey);
|
||||
}
|
||||
|
Reference in New Issue
Block a user