# Is it possible make HttpAccessModule available in context "if"

**URL:** <https://www.ruby-forum.com/t/is-it-possible-make-httpaccessmodule-available-in-context-if/199715>\
**Category:** NGINX\
**Created:** [November 27, 2010, 8:50am UTC](https://www.ruby-forum.com/t/is-it-possible-make-httpaccessmodule-available-in-context-if/199715 "2010-11-27T08:50:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dobai-Pataky\_BSSSSl](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/77aa72/32.png) [@Dobai-Pataky\_BSSSSl](https://www.ruby-forum.com/u/Dobai-Pataky_BSSSSl)\
**Post date:** [November 27, 2010, 8:50am UTC](https://www.ruby-forum.com/t/is-it-possible-make-httpaccessmodule-available-in-context-if/199715/1 "2010-11-27T08:50:08Z")

</div>

I hope nginx can be handle this such as,

if ($http\_user\_agent ~ MSIE) {  
allow 127.0.0.1;  
deny all;  
}  
if ($http\_cookie ~\* “id=([^;] +)(?:;|$)” ) {  
allow 10.0.0.1;  
deny all;  
}

Posted at Nginx Forum:

> **[Is it possible make HttpAccessModule available in context "if"](https://forum.nginx.org/read.php?2,153628,153628#msg-153628)**
>
> I hope nginx can be handle this such as, if ($http\_user\_agent ~ MSIE) { allow 127.0.0.1; deny all; } if ($http\_cookie ~\* "id=(\[^;\] +)(?:;|$)" ) { allow 10.0.0.1; deny all; }
