feat: implement public route support and elevate auth guard log levels to info
Build and Push Multi-Platform Images / build-and-push (push) Successful in 35s
Build and Push Multi-Platform Images / build-and-push (push) Successful in 35s
This commit is contained in:
@@ -31,7 +31,7 @@ export class ApiKeyGuard implements CanActivate {
|
||||
}
|
||||
}
|
||||
|
||||
this.logger.debug(
|
||||
this.logger.log(
|
||||
`[${method} ${url}] key source: ${apiKey ? source : 'NONE'} | ` +
|
||||
`headers: ${JSON.stringify(Object.keys(request.headers))} | ` +
|
||||
`key prefix: ${apiKey ? String(apiKey).slice(0, 8) + '…' : 'n/a'}`,
|
||||
@@ -44,7 +44,7 @@ export class ApiKeyGuard implements CanActivate {
|
||||
|
||||
try {
|
||||
const keyEntry = await this.apiKeysService.validateKey(apiKey as string);
|
||||
this.logger.debug(`[${method} ${url}] accepted – key "${keyEntry.name}" (id=${keyEntry.id})`);
|
||||
this.logger.log(`[${method} ${url}] accepted – key "${keyEntry.name}" (id=${keyEntry.id})`);
|
||||
request.apiKeyMetadata = { id: keyEntry.id, name: keyEntry.name };
|
||||
return true;
|
||||
} catch (err) {
|
||||
|
||||
Reference in New Issue
Block a user