I have this web service that's running on nginx and fastcgi(php-fpm). The web service is used by some embeded http clients which will need to send some arbitrary http request headers when they are using the service. For example:
CLIENT_ID: client1
CLIENT_AUTH_TOKEN: d84ldx
or something like that.
I'm not sure if this kind of request will be captured by nginx when it arrives. If so, how would nginx store the values of the extra HTTP headers? And how to tell nginx to pass the parameters to php?
I have already tried to put
fastcgi_param CLIETN_ID $client_id
into conf/fastcgi_params configuration file, I supposed this will help nginx to store what's in CLIENT_ID as the $client_id param. I also put
fastcgi_param CLIENT_ID $client_id
simply to fetch what's stored in $client_id and pass it to php as keyed 'CLIENT_ID', so php can access it with $_SERVER['CLIENT_ID'].
Unfortunately the above didn't work out. When I do
nginx -t
I got the error "unknow parameter client_id". Where did I get it wrong and how to fix it?
Thank you.