fix and test

This commit is contained in:
Adisak 2025-11-12 15:21:59 +07:00
parent b468d7bfe9
commit f035713e34
2 changed files with 2 additions and 2 deletions

View file

@ -34,7 +34,7 @@ export async function expressAuthentication(
if (apiKeyHeader === process.env.API_KEY) {
return { preferred_username: "api_key_bypass", apiKeyBypass: true };
} else {
return undefined;
throw new HttpError(HttpStatus.FORBIDDEN, "API key ไม่ถูกต้อง");
}
}
if (process.env.NODE_ENV !== "production" && process.env.AUTH_BYPASS) {