[dancer-users] Apache environment in FCGI app

Keith Lawson Keith.Lawson at sjhc.london.on.ca
Fri Nov 29 15:22:03 GMT 2013


Hello, 

I'm working on my first Dancer application and want to deploy it in our standard server environment here. 

For authentication/authz we have custom mod_perl auth handlers that set Apache environment variables with user ID, group membership etc. I'm trying to write an implementation of Dancer::Plugin::Auth::Extensible::Provider that does auth/authz by reading those environment variables however %ENV isn't populated in my Dancer app. Looking at the source of public/dispatch.fcgi I noticed the following:

# For some reason Apache SetEnv directives dont propagate
# correctly to the dispatchers, so forcing PSGI and env here 
# is safer.
set apphandler => 'PSGI';
set environment => 'production';

Can anyone tell me if it's possible to get %ENV through to my Dancer app or perhaps a different approach for auth/authz that uses $ENV{REMOTE_USER} and our custom Apache environment variables? 

Thanks, 
Keith.



 --------------------------------------------------------------------------------
This information is directed in confidence solely to the person named above and may contain confidential and/or privileged material. This information may not otherwise be distributed, copied or disclosed. If you have received this e-mail in error, please notify the sender immediately via a return e-mail and destroy original message. Thank you for your cooperation.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.preshweb.co.uk/pipermail/dancer-users/attachments/20131129/abd0938d/attachment.html>


More information about the dancer-users mailing list