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

Re: Preaccess handler being called twice

$
0
0
Hi,
I got same problem in my sample.
I found that redirect raise this issue.

you can load your page by http://127.0.0.1/index.html
not http://127.0.0.1/

nginx will redirect the request to index.html to find default page.

i used ngx_http_request_t uri_changes to avoid run my logic twice.

if (r->uri_changes == 11){
... YOUR CODE
}

Viewing all articles
Browse latest Browse all 4759

Trending Articles



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