<div dir="ltr"><img width="0" height="0" class="mailtrack-img" alt="" style="display:flex" src="https://mailtrack.io/trace/mail/3cdb844d6a58b59351c6b1b0d4dffdf19c862791.png?u=74734"><div></div><div></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;color:#000000">
<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:Calibri,sans-serif">Thank you for validating. I was not sure if the “if” here
was a good use. <span></span></p>
<br></div><div class="gmail_extra"><br clear="all"><div><div class="m_1635576992381193764gmail_signature" data-smartmail="gmail_signature">- Quintin</div></div>
<br><div class="gmail_quote">On Mon, May 28, 2018 at 9:28 AM, Aleksandar Lazic <span dir="ltr"><<a href="mailto:al-nginx@none.at" target="_blank">al-nginx@none.at</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On 28/05/2018 07:16, Quintin Par wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
My website’s being hit hard and I am trying to see if I can limit this at<br>
the load balancer (Nginx) level by cutting off requests that don’t have a<br>
special header.<br>
<br>
I’ve seen some solutions that involve the if statement, notably<br>
<br>
<a href="https://mailtrack.io/trace/link/ff187b241fb110ea6410647c76dcff0ede27409b?url=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F18970620%2Fnginx-reject-request-if-header-is-not-present-or-wrong&userId=74734&signature=3d46a17240b8dccb" rel="noreferrer" target="_blank">https://stackoverflow.com/ques<wbr>tions/18970620/nginx-reject-re<wbr>quest-if-header-is-not-present<wbr>-or-wrong</a><br>
<br>
<br>
Can someone help me with a solution that does NOT involve using an if<br>
statement?<br>
</blockquote>
<br></span>
What's wrong with if in your use case.<br>
<br>
The solution with the map looks okay to me.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
- Quintin<br>
</blockquote>
<br>
Best regards<br>
aleks<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
______________________________<wbr>_________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a><br>
<a href="https://mailtrack.io/trace/link/7ebb0fa17bf49ee0752d217598865e9246529106?url=http%3A%2F%2Fmailman.nginx.org%2Fmailman%2Flistinfo%2Fnginx&userId=74734&signature=dbe9405384fc1bee" rel="noreferrer" target="_blank">http://mailman.nginx.org/mailm<wbr>an/listinfo/nginx</a><br>
</blockquote>
<br>
______________________________<wbr>_________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a><br>
<a href="https://mailtrack.io/trace/link/7ebb0fa17bf49ee0752d217598865e9246529106?url=http%3A%2F%2Fmailman.nginx.org%2Fmailman%2Flistinfo%2Fnginx&userId=74734&signature=dbe9405384fc1bee" rel="noreferrer" target="_blank">http://mailman.nginx.org/mailm<wbr>an/listinfo/nginx</a></blockquote></div><br></div></div>