Welcome! Log In Create A New Profile

Advanced

Re: How to pass fastcgi custom variables in C?

Francis Daly
January 24, 2015 08:42AM
On Wed, Jan 21, 2015 at 07:30:48PM -0500, nginxuser100 wrote:

Hi there,

> Hi, I would like to have the auth_request fastcgi auth server to send some
> custom variables to the fastcgi back-end server.

You have the nginx config to send a cookie from the auth_request server
to the fastcgi upstream, I think.

The same config pattern should work for anything else returned.

(set a variable based on what "auth" returns, then send that as a
fastcgi_param.)

> Could someone give me a pointer on how to this in the nginx.conf and the
> auth and back-end servers in C? I saw many examples for PHP but none for C.

The nginx conf should match what you already have; the rest is
presumably according to the http or fastcgi specs (there should be
nothing nginx-specific about it).

> In the auth server app, I defined "int custom_param=100" for example, and
> would like the back-end server to see get this variable and value. Thanks!

Return it as a http response header, just like you would for a Set-Cookie:.

f
--
Francis Daly francis@daoine.org

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

How to pass fastcgi custom variables in C?

nginxuser100 January 21, 2015 07:30PM

Re: How to pass fastcgi custom variables in C?

Francis Daly January 24, 2015 08:42AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 60
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready