In Nginx am looking to post to a URL prior to calling proxy_pass, i.e.
location / {
<! --- Post to a URL here -->
proxy_set_header Correction "";
proxy_set_header Accept-Encoding "";
proxy_buffering on;
proxy_cache_background_update on;
proxy_cache_revalidate on;
proxy_cache_lock on;
proxy_cache_valid 200 301 302 1440m;
proxy_cache_valid 404 1m;
proxy_cache $mydomian_proxy;
proxy_cache_methods GET HEAD POST;
autoindex on;
proxy_pass https://to . com$request_uri;
}
The URL post is to Matoomo tracking API e.g.
https://matomo-server/matomo.php?_cvar={"1":["OS","iphone 5.0"],"2":["Matomo Mobile Version","1.6.2"],"3":["Locale","en::en"],"4":["Num Accounts","2"]}&action_name=View settings&url=http://mobileapp.matomo.org/window/settings &idsite=8876&rand=351459&h=18&m=13&s=3 &rec=1&apiv=1&cookie=1&urlref=https://iphone.mobileapp.piwik.org&_id=af344a398df83874 &_idvc=19&res=320×480&
I hope this may sense?
If you know how this can be achieve or a different approach to achieving this, it would be very helpful.
Thanks, Pete