Nginx lua modify html response after proxy_pass -


What am I trying to do for a POC and adding a href to the web pages coming from a dynamic backend server Adding Href is easy to use "subs_filter", but I have to use embedded information in response to the creation of href.

Is it possible to use LUA to process the reaction from proxy_pass, to modify it and return to the requester (client)?

Any other suggestions are welcome

I see the code below, now I see Lua better and see how I use NGX. The 'body_filter' is the right way though the code seems quite simple but I can not get the regex to work.

The forward background, I am trying to parse the returned proxy_pass response, it is parsed for start and end time, then a JS script url is inserted into the head.

Reaction to the example which I want to regx again.

  Notifications Horace: 08H50 Horror Day: 09 H14  

Code from within 'Location {}'

  Body_filter_by_lua '- my regex which is valid but does not appear within the lucid - local, for, err = ngx.re.find (ngx.reg [1], "(.início: * \ d {2} H \ d { 2}), from "local" to err = ngx Re.find (ngx.arg [1], "início", "jo") replacestr = string.sub (ngx.arg [1], from, 5) replaceme = "



  

Comments

Popular posts from this blog

c# - SignalR: "Protocol error: Unknown transport." when navigating to hub -

c# - WPF Expander overlay used in ItemsControl -

class - Kivy: how to instantiate a dynamic classes in python -