shukitchan commented on issue #12064:
URL: 
https://github.com/apache/trafficserver/issues/12064#issuecomment-2787026789

   You mentioned before that it works from a browser but not eclipse client. So 
that's why I am saying that it is not an ATS problem. Can you see why it is a 
different behavior between browser and eclipse client? also I was asking why 
you cannot simply use lua to change the value to 
`x-jsa-authorization-redirect`. I think you almost got it right last time. 
Right? If i simplify your script further, does it do something meaningful?
   
   ```
   function send_response()
   local header_name = "x-jsa-authorization-redirect"
   local jsa = ts.client_response.header[header_name]
   local file = io.open("/var/log/trafficserver/lua.log", "a")
   
   if jsa then
   file:write("Original Header: " .. jsa .. "\n")
   
   -- just replace one string
   local modified = jsa:gsub("ihsurl", "trafficserver")
   
   ts.client_response.header[header_name] = modified
   file:write("Modified Header: " .. modified .. "\n")
   else
   file:write("Header not found!\n")
   end
   
   file:close()
   end
   
   function do_remap()
   ts.hook(TS_LUA_HOOK_SEND_RESPONSE_HDR, send_response)
   
   local file = io.open("/var/log/trafficserver/lua.log", "a")
   file:write("Lua script is running.\n")
   file:close()
   
   return 0
   end
   
   ```
   
   How are you using your header_rewrite plugin? Inside plugin.config or inside 
remap.config ?
   
   Can you post your remap.config and records.config as well?
   
   "Another thing is if i used my applicationalias in remap.config it works." - 
what does this mean? can you please elaborate? with 
remap.config/records.config/plugin.config together?
   
   There are many reasons that some plugin execution can happen before remap. 
But it may not be the case at all


-- 
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]

Reply via email to