I have deployed my application using the azure pipelines.I want to integrate the release pipeline with a script that will dynamically update the haproxy.cfg to re-map the Url of an application.
Example for manually mapping in haproxy.cfg
frontend http-in mode http bind 188.8.131.52:80 acl path-page-designer path_beg -i /designer-api/ use_backend page-designer-backend if path-page-designer backend page-designer-backend mode http option httplog option forwardfor server appserver1 184.108.40.206:30000
Now how can I use Lua scripting inside haproxy to automatically map the url of the application.I will invoke this via a command line script from azure release pipeline. I am talking about a generic script here that can be used for all the pipelines. I will be passing all the application specific details to the script as parameter from the pipeline configuration.Plz help with examples of how the script should look like for my haproxy configration.
Note:I want to strictly only use haproxy for this and not nginx.