fix and test
This commit is contained in:
parent
b468d7bfe9
commit
f035713e34
2 changed files with 2 additions and 2 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue