shukitchan commented on issue #12064:
URL:
https://github.com/apache/trafficserver/issues/12064#issuecomment-2724950896
"but didnt achieve the results" - Does the `x-jsa-authorization-redirect`
change or not?
So basically you want the `x-jsa-authorization-redirect` header in the
response to be a specific value. Right?
So let's just do a trial here. Does the below code even change
`x-jsa-authorization-redirect` header or not?
```
function send_response()
local jsa = ts.client_response.header['x-jsa-authorization-redirect']
ts.client_response.header['x-jsa-authorization-redirect'] = 'badresult'
local file = io.open("/var/log/trafficserver/lua_output2.log", "a")
file:write("Lua script is changing the jsa header of outgoing response to
client. Original header is ".. jsa)
file:close()
end
function do_remap()
ts.hook(TS_LUA_HOOK_SEND_RESPONSE_HDR, send_response)
local file = io.open("/var/log/trafficserver/lua_output2.log", "a")
file:write("Lua script is running.\n")
file:close()
return 0
end
```
If yes, then you can use the script as a base to change
x-jsa-authorization-redirect header to anything you want.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]