Skip to content

Commit da07bc2

Browse files
committed
Set getJwt logs to NGX_LOG_DEBUG
1 parent 89d9830 commit da07bc2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ngx_http_auth_jwt_module.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -398,22 +398,22 @@ static char * getJwt(ngx_http_request_t *r, ngx_str_t auth_jwt_validation_type)
398398
ngx_int_t n;
399399
ngx_str_t authorizationHeaderStr;
400400

401-
ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, "auth_jwt_validation_type.len %d", auth_jwt_validation_type.len);
401+
ngx_log_error(NGX_LOG_DEBUG, r->connection->log, 0, "auth_jwt_validation_type.len %d", auth_jwt_validation_type.len);
402402

403403
if (auth_jwt_validation_type.len == 0 || (auth_jwt_validation_type.len == sizeof("AUTHORIZATION") - 1 && ngx_strncmp(auth_jwt_validation_type.data, "AUTHORIZATION", sizeof("AUTHORIZATION") - 1)==0))
404404
{
405405
// using authorization header
406406
authorizationHeader = search_headers_in(r, authorizationHeaderName.data, authorizationHeaderName.len);
407407
if (authorizationHeader != NULL)
408408
{
409-
ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, "Found authorization header len %d", authorizationHeader->value.len);
409+
ngx_log_error(NGX_LOG_DEBUG, r->connection->log, 0, "Found authorization header len %d", authorizationHeader->value.len);
410410

411411
authorizationHeaderStr.data = authorizationHeader->value.data + sizeof("Bearer ") - 1;
412412
authorizationHeaderStr.len = authorizationHeader->value.len - (sizeof("Bearer ") - 1);
413413

414414
jwtCookieValChrPtr = ngx_str_t_to_char_ptr(r->pool, authorizationHeaderStr);
415415

416-
ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, "Authorization header: %s", jwtCookieValChrPtr);
416+
ngx_log_error(NGX_LOG_DEBUG, r->connection->log, 0, "Authorization header: %s", jwtCookieValChrPtr);
417417
}
418418
}
419419
else if (auth_jwt_validation_type.len > sizeof("COOKIE=") && ngx_strncmp(auth_jwt_validation_type.data, "COOKIE=", sizeof("COOKIE=") - 1)==0)

0 commit comments

Comments
 (0)