How can I write a module that overwrite user header_in

I want to write a write a module that can intercept user requests,and
then overwrite header_in.
The fastcgi can get the modified requests.

And how the config file writing?

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,56046,56046#msg-56046