Welcome! Log In Create A New Profile

Advanced

proxy_pass in post_action location does not send any http request

December 03, 2019 04:48AM
Hi

I am trying to configure NGINX to send another http request after successful completion of the original proxied request, in order to count statistics etc'
I am using post_action with proxy_pass as following:

location / {
proxy_http_version 1.1;
proxy_set_header HOST $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port 1061;
proxy_set_header X-Forwarded-Host $host:1061;
proxy_set_header X-Forwarded-Server $host:1061;
proxy_read_timeout 86400;
proxy_max_temp_file_size 0;
proxy_set_header Connection "";

set $backend rack-storage-radosgw:8802;

proxy_pass http://$backend;

post_action /send_event;
}

location /send_event {
proxy_method POST;
set $s3_proxy_request s3-proxy-manager:8946/internal/api/v3/s3proxies/actions/raise_event;
proxy_pass http://$s3_proxy_request;
}


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?
Thanks
Subject Author Posted

proxy_pass in post_action location does not send any http request

jacks December 03, 2019 04:48AM

Re: proxy_pass in post_action location does not send any http request

Francis Daly December 11, 2019 03:48PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 78
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready