node-phpfpm icon indicating copy to clipboard operation
node-phpfpm copied to clipboard

Cookies, other headers?

Open edgework opened this issue 9 years ago • 1 comments

Is it possible to forward other headers to PHP, "cookie" for example ?

edgework avatar Nov 28 '16 23:11 edgework

I believe this could be done easily with a small fix to phpfpm.prototype.run

by changing

var fastcgiParams = info.fastcgiParams || {
		QUERY_STRING: info.queryString || '',
...
}

into

var fastcgiParams = Object.assign(info.fastcgiParams, {
		QUERY_STRING: info.queryString || '',
...
})

you could pass the cookies using HTTP_Cookie (and other header) to the run options.

starfishmod avatar Feb 22 '17 04:02 starfishmod