From: Rha Date: 2008-02-05T17:49:58+09:00 Subject: Re: Adding extra fields to request headers If you don't know the answer, it is absurd and ignorant to answer with a non-answer. Did you know you can do CGI on ruby? did you know that request headers are a web server concept and language agnostic? Besides, ruby on rails IS ruby in the end. ANSWER: It depends on the web server you're using, but I will assume you're using apache, so you use something like this in httpd.conf or apache.conf: RequestHeader add X-Your-Variable-Name 'The Value' For example to use it to pass the logged on user name for a Windows domain, something like this might work: ServerName yourwinserver.com ServerAlias www.yourwinserver.com RewriteLog logs/myapp_rewrite_log RewriteLogLevel 9 AuthName "Authenticate to MyApp" AuthType SSPI SSPIAuth On SSPIAuthoritative On SSPIOmitDomain On Require valid-user RewriteEngine On RewriteCond %{IS_SUBREQ} ^false$ RewriteCond %{LA-U:REMOTE_USER} (.*) RewriteRule . - [E=RU:%1] RequestHeader add X-Remote-User %{RU}e ProxyPass / http://www.yourwebserver.com:3000/ ProxyPassReverse / http://www.yourwebserver.com:3000 ProxyPreserveHost on Hope this helps. Have a good day! On Tue, 05 Feb 2008 17:10:21 +1100, Clifford Heath wrote: >Pradeepta Swain wrote: >> how can i add extra fields to request headers ? > >Please ask this in a Rails forum - this is Ruby here, not Rails.