[Seaside] Reading Apache environment variables in Seaside

Philippe Marschall philippe.marschall at gmail.com
Fri Apr 8 17:46:19 UTC 2011

2011/4/7, Philippe Marschall <philippe.marschall at gmail.com>:
> 2011/4/7 Charlie Meyer <cemeyer2 at illinois.edu>:
>> All,
>> I am working on developing a Seaside application which I eventually plan
>> to
>> deploy behind our university's custom authentication system. This
>> mechanism
>> sets a particular Apache environment variable equal to the username that
>> was
>> authenticated. I have read through all of the Seaside book and looked
>> through the classes, but have not come to an answer on how I can read out
>> environment variables from the request, especially when served behind
>> Apache. I currently serve other applications using different frameworks
>> via
>> AJP behind Apache and the necessary variables are passed through, so I am
>> hoping there is a way to get access to them in Seaside. Any guidance
>> would
>> be fantastic.
> Well since you're already using AJP why not keep using AJP [1]? It
> should read the environment variables. There's one gotcha though, it
> doesn't pass them to Seaside yet. They could be put on the request or
> request context though.
>  [1]
> http://book.seaside.st/book/advanced/deployment/deployment-apache/mod-proxy-ajp

I just added it to the very latest AJP. Doing

    self requestContext ajpAttributes

Should give you a dictionary with the environment variables.


More information about the seaside mailing list