(52) Empty reply from server
pankajitbhu at gmail.com
Mon May 9 09:04:13 UTC 2016
Its means nginx do not have any API as other server having to set header
and get header ? very strange ...
I need to write my own module to read and write cookies values?
My module is in written in C programming language.
On Thu, May 5, 2016 at 7:32 PM, Valentin V. Bartenev <vbart at nginx.com>
> On Thursday 05 May 2016 10:27:46 Pankaj Chaudhary wrote:
> > Hi,
> > thank you!
> > My module is basically for resource protection.
> > I have already running my module on other servers also.
> > My module follow below steps.
> > -Generate cookie and write in response header
> > -read from header when cookie is needed
> > IIS have API setheader() to set header and getheader() to get header.
> > Apache have apr_table_get() to get value from header and apr_table_set()
> > set the value in header.
> > Do we have similar APIs in nginx?
> > How i can achieve same kind of behavior in nginx?
> If you want to set a response header, then should look to the
> source of ngx_http_headers_module, which is responsible for
> adding headers to output.
> For reading cookies you can look to the $http_cookie variable
> Please, use "grep" for search and read the code.
> You can implement your module a way easier if you just provide
> a directive, that can use the variable to read some value, and
> adds a variable to set the value.
> Then it can be used like this:
> protection_value $cookie_key;
> add_header Set-Cookie "key=$protection_value";
> You can also check the ngx_http_secure_link_module:
> wbr, Valentin V. Bartenev
> nginx mailing list
> nginx at nginx.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the nginx