File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed
Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -303,7 +303,7 @@ static ngx_int_t ngx_sts_post_config(ngx_conf_t *cf)
303303
304304static ngx_int_t ngx_sts_handler (ngx_http_request_t * r )
305305{
306- ngx_int_t rv = NGX_ERROR ;
306+ ngx_int_t rv = NGX_DECLINED ;
307307 bool rc = false;
308308 oauth2_nginx_request_context_t * ctx = NULL ;
309309 ngx_sts_config * cfg = NULL ;
@@ -360,18 +360,15 @@ static ngx_int_t ngx_sts_handler(ngx_http_request_t *r)
360360 target_token ? target_token : "(null)" , rc );
361361
362362 if (rc == false) {
363- if (status_code < 500 ) {
364- r -> headers_out .status = NGX_HTTP_UNAUTHORIZED ;
365- } else {
366- r -> headers_out .status = (ngx_uint_t )status_code ;
367- }
363+ r -> headers_out .status = (status_code < 500 )
364+ ? NGX_HTTP_UNAUTHORIZED
365+ : (ngx_uint_t )status_code ;
366+ rv = NGX_ERROR ;
368367 goto end ;
369368 }
370369
371- if (target_token == NULL ) {
372- rv = NGX_DONE ;
370+ if (target_token == NULL )
373371 goto end ;
374- }
375372
376373 cfg -> target_token .len = strlen (target_token );
377374 cfg -> target_token .data = ngx_palloc (r -> pool , cfg -> target_token .len );
You can’t perform that action at this time.
0 commit comments