proxy_pass in post_action location does not send any http request
I am trying to configure NGINX to send another http request after successful
completion of the original proxied request, in order to count statistics
I am using post_action with proxy_pass as following:
The request in location / is sent to rack-storage-radosgw.service.strato
and is completed successfully, but the request to s3-proxy-manager is not
sent at all. I used tcpdump to capture any traffic on port 8946 and no
traffic arrived. I also checked that send_event location is entered by code,
and it does ( using rewrite_by_lua_block).
What am i doing wrong?
# for mod_zip and x-accel-redirect requests, proxying the
# request to S3 to fulfill the zip manifest or the x-accel-redirect URI
resolver 22.214.171.124 valid=30s; # Google DNS
This does work for sending the post_action response after the /download
request is served- with one notable caveat! It does not work for
X-Accel-Redirect responses from my app server. As far as I can tell, the
post_action is either (1) never called in that case, or (2) has some other
issue I have been able to figure out. I've dug around in the C source for
Nginx, but it gets to a spot pretty quick where I'm in over my head.