Hello!<div><br></div><div>Thanks, I see. Because I do not have time for develop in C, PHP, Perl, etc everything is remain as is.</div><div><br></div><div>Bye,</div><div>Zsolt<br><div><br><div class="gmail_quote">2009/6/11 merlin corey <span dir="ltr"><<a href="mailto:merlincorey@dc949.org">merlincorey@dc949.org</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">NginX does not provide any kind of internal API for session data or<br>
anything of that sort... You could do what you want with embedded<br>
perl, probably, if you really want to keep it in NginX, otherwise<br>
you're back to using $cookie_name variables (which is probably the<br>
easiest/fastest solution) or you will want to write a module for NginX<br>
itself.<br>
<font color="#888888"><br>
-- Merlin<br>
</font><div><div></div><div class="h5"><br>
On Thu, Jun 11, 2009 at 3:11 AM, Artifex Maximus<<a href="mailto:artifexor@gmail.com">artifexor@gmail.com</a>> wrote:<br>
> Hello!<br>
><br>
> On Wed, Jun 10, 2009 at 11:53 PM, merlin corey <<a href="mailto:merlincorey@dc949.org">merlincorey@dc949.org</a>><br>
> wrote:<br>
>><br>
>> That is precisely the kind of control required to take place in an<br>
>> upstream application, not nginx. Nginx should be thought of as sort<br>
>> of a signal processor, that is, it sits in a stream and does its<br>
>> business as quickly and efficiently as possible. Waiting on databases<br>
>> is neither quick nor efficient.<br>
><br>
> First of all thanks for your answer Merlin!<br>
> I think it as an option so user have the choice using it or not. And in this<br>
> way user decides to put load on server or not. But in short there is no such<br>
> option.<br>
><br>
>><br>
>> Also there is nothing secure about cookies, which can be completely<br>
>> manipulated by the client. Session data, on the other hand, is<br>
>> internal and therefore much more reliable (and is basically what you<br>
>> want to use).<br>
><br>
> I know it but not as easy as cheating on referrer. I do not look for writing<br>
> the perfect protection system actually but good enough for basic protection<br>
> and using as much of different techniques as possible but not more. And I do<br>
> not want to write any external code (PHP in my case) let's say I am lazy. If<br>
> I am able to store and retrieve used cookies and their deadline within nginx<br>
> the system would be pretty useful.<br>
> Is nginx have session data or some external processing required?<br>
> Bye,<br>
> Zsolt<br>
><br>
>><br>
>> On Wed, Jun 10, 2009 at 3:16 AM, Artifex Maximus<<a href="mailto:artifexor@gmail.com">artifexor@gmail.com</a>><br>
>> wrote:<br>
>> > Hello!<br>
>> ><br>
>> > On Tue, Jun 9, 2009 at 2:48 PM, Artifex Maximus<<a href="mailto:artifexor@gmail.com">artifexor@gmail.com</a>><br>
>> > wrote:<br>
>> >> 2009/6/9 Igor Sysoev <<a href="mailto:is@rambler-co.ru">is@rambler-co.ru</a>>:<br>
>> >>> On Tue, Jun 09, 2009 at 01:30:50PM +0200, Artifex Maximus wrote:<br>
>> >>><br>
>> >>>> I am pretty newbie to nginx and having problem on protecting my<br>
>> >>>> links.<br>
>> >>>> I am using valid_referers but is it possible using cookies for make<br>
>> >>>> it<br>
>> >>>> stronger?<br>
>> >>>><br>
>> >>>> For example I set cookie uid with nginx's userid in 'location / {}'<br>
>> >>>> and check somehow under 'location /download/ {}' for cookie uid. Is<br>
>> >>>> it<br>
>> >>>> possible or just a dream? Userid was just an idea and not necessary.<br>
>> >>>> And any other ideas are welcome as well because cheating referer is<br>
>> >>>> easy task.<br>
>> >>><br>
>> >>> location /download/ {<br>
>> >>> if ($cooke_NAME = '') {<br>
>> >>> return 403;<br>
>> >>> }<br>
>> >>> }<br>
>> >><br>
>> >> Looks nice. Thank you Igor!<br>
>> ><br>
>> > And working perfectly though. Is there any simple solution (without<br>
>> > PHP or any external utility) to tracking this cookies? I mean storing<br>
>> > cookies in database and checking that cookie have sent is valid or<br>
>> > not. Or is it too complex and not nginx task?<br>
>> ><br>
>> > Bye,<br>
>> > Zsolt</div></div></blockquote></div></div></div>