[dancer-users] Basic authentication and Dancer

WK wanradt at gmail.com
Fri Feb 12 21:09:59 GMT 2016


I try to run  one simple Dancer app behind Apache proxy and because
there is a bunch of old CGI scripts running on same server, restricted
by basic authentication, I'd like to use the same authentication
scheme in Dancer app too.

My Apache config looks like this:

<Location /xyz/z >
    ProxyPass http://localhost:5001
    ProxyPassReverse http://localhost:5001
    RequestHeader set Request-Base /xyz/z
    AuthName "myadmin"
    AuthType basic
    AuthUserFile /etc/htpasswd.adm
    Require valid-user

So far, so good.

Problem: in Dancer I can't access env variable REMOTE_USER.

AFAIU Dancer::Request object does not forward this variable.  What is
the best way to access REMOTE_USER value inside Dancer?

Kõike hääd,


More information about the dancer-users mailing list