<div dir="ltr"><div><div>Hi,<br><br></div> I have installed that android app and requested log against my ip is following :<br><br>39.49.52.224 - - [15/Mar/2015:10:40:26 +0500] "GET /files/thumbs/2015/03/14/1426310448973c5-1.jpg HTTP/1.1" 200 13096 "-" "Dalvik/1.6.0 (Linux; U; Android 4.2.2; GT-S7582 Build/JDQ39)"<br><br>where 39.49.52.224 is ip of my modem.<br><br></div><div>I have also tried blocking specific user agent such as Android but neither it worked (sure i am doing something wrong) nor this is the correct solution : <br><br>if ($http_user_agent ~* "Linux;Android 4.2.2") {<br> return 403;<br>}<br><br></div><div><br></div><div>Thanks.<br></div><div>Shahzaib<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 16, 2015 at 6:28 PM, Francis Daly <span dir="ltr"><<a href="mailto:francis@daoine.org" target="_blank">francis@daoine.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Mon, Mar 16, 2015 at 04:09:30PM +0500, shahzaib shahzaib wrote:<br>
<br>
Hi there,<br>
<span class=""><br>
> Webserver is nginx and hotlinking is already enabled but the issue with no<br>
> Referer_Header for the requests being generated by this android<br>
> application.<br>
><br>
> What precautions should we take to prevent this application by using our<br>
> server's bandwidth ?<br>
<br>
</span>You have "the requests that you wish to allow as normal". You have "the<br>
requests that you wish not to allow, since they come from this client".<br>
<br>
What part of the request that nginx sees puts it into the "yes" or<br>
"no" bucket?<br>
<br>
Put that in your configuration, so that "yes" does what happens now,<br>
and "no" returns a http error, or returns a different video inviting<br>
the client to get your official app.<br>
<br>
Perhaps their app uses a unique User-Agent header; or all "wanted"<br>
clients do include a Referer header?<br>
<br>
If you can't tell a "good" request from a "bad" one, you probably cannot<br>
configure nginx to.<br>
<span class="HOEnZb"><font color="#888888"><br>
f<br>
--<br>
Francis Daly <a href="mailto:francis@daoine.org">francis@daoine.org</a><br>
</font></span><div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
</div></div></blockquote></div><br></div></div>