Skip to content

Commit fe9eedb

Browse files
committed
[fapi] use x-fapi-interaction-id header
1 parent a602926 commit fe9eedb

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

gateway/src/apicast/policy/fapi/fapi.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ local b64 = require('ngx.base64')
1313
local fmt = string.format
1414

1515
local new = _M.new
16-
local X_FAPI_TRANSACTION_ID_HEADER = "x-fapi-transaction-id"
16+
local X_FAPI_INTERACTION_ID_HEADER = "x-fapi-interaction-id"
1717
local X_FAPI_CUSTOMER_IP_ADDRESS = "x-fapi-customer-ip-address"
1818

1919
-- The "x5t#S256" (X.509 Certificate SHA-256 Thumbprint) Header
@@ -98,15 +98,15 @@ end
9898
function _M:header_filter()
9999
--- 6.2.1.11
100100
-- shall set the response header x-fapi-interaction-id to the value received from the corresponding FAPI client request header or to a RFC4122 UUID value if the request header was not provided to track the interaction
101-
local transaction_id = ngx.req.get_headers()[X_FAPI_TRANSACTION_ID_HEADER]
101+
local transaction_id = ngx.req.get_headers()[X_FAPI_INTERACTION_ID_HEADER]
102102
if not transaction_id or transaction_id == "" then
103103
-- Nothing found, generate one
104-
transaction_id = ngx.resp.get_headers()[X_FAPI_TRANSACTION_ID_HEADER]
104+
transaction_id = ngx.resp.get_headers()[X_FAPI_INTERACTION_ID_HEADER]
105105
if not transaction_id or transaction_id == "" then
106106
transaction_id = uuid.generate_v4()
107107
end
108108
end
109-
ngx.header[X_FAPI_TRANSACTION_ID_HEADER] = transaction_id
109+
ngx.header[X_FAPI_INTERACTION_ID_HEADER] = transaction_id
110110
end
111111

112112
return _M

0 commit comments

Comments
 (0)