Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

What are the rules around perl calls?

$
0
0
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...

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>