What are the rules around perl calls?
October 17, 2018 08:13PM
I'm playing with ngx_http_perl_module; for starters, just logging to error_log and setting headers:

location / {
set $target https://$host$request_uri;
perl ph::handler;
add_header X-debug-message "redirect target: $target" always;
return 302 $target;
}

However, if I have that return 302 in there, the perl module is ignored. Commenting it out makes it work. One of the things I may want the perl module to do is change $target or do something locally before issuing the redirect. The docs don't say when and when not the module is actually called... I'm pretty sure I can do the redirect inside perl, but it would be cleaner to do it this way...
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 181
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready