File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -10,11 +10,15 @@ Custom Kong plugin to allow for fine grained Authorization through [Open Policy
10
10
11
11
Plugin will continue the request to the upstream target if OPA responds with ` true ` , else the plugin will return a ` 403 Forbidden ` .
12
12
13
- Plugin will add the response headers :
13
+ Plugin will add the:
14
14
15
- - ` X-Kong-Authz-Latency ` : Latency generated by the plugin
16
- - ` X-Kong-Authz-Cache ` : "Miss" or "Hit" when cache is enabled
17
- - ` X-Kong-Authz-Skip ` : "true" when ` fault_tolerant ` is enabled and Kong had troubles
15
+ - request headers:
16
+ - ` X-Kong-Authz-Skipped ` : "true" when ` fault_tolerant ` is enabled and Kong had troubles
17
+
18
+ - response headers:
19
+ - ` X-Kong-Authz-Latency ` : Latency generated by the plugin
20
+ - ` X-Kong-Authz-Cache ` : "Miss" or "Hit" when cache is enabled
21
+ - ` X-Kong-Authz-Skipped ` : "true" when ` fault_tolerant ` is enabled and Kong had troubles
18
22
19
23
Plugin priority: ` 799 `
20
24
Original file line number Diff line number Diff line change @@ -185,7 +185,8 @@ function _M.execute(conf)
185
185
if (not body ) or (err ) then
186
186
if conf .fault_tolerant then
187
187
kong .response .set_header (" X-Kong-Authz-Latency" , (ngx .now () - start_time ))
188
- kong .response .set_header (" X-Kong-Authz-Skip" , " true" )
188
+ kong .response .set_header (" X-Kong-Authz-Skipped" , " true" )
189
+ kong .service .request .set_header (" X-Kong-Authz-Skipped" , " true" )
189
190
return true
190
191
else
191
192
return kong .response .exit (500 , { message = " An unexpected error occurred" , error = err })
You can’t perform that action at this time.
0 commit comments