apache 使用ProxyPass时未传递来自Shibboleth的环境变量

xoshrz7s  于 2023-03-31  发布在  Apache
关注(0)|答案(1)|浏览(125)

我使用Shibboleth沿着w/ Apache(w/ mod_proxy),我注意到像REMOTE_USER这样的环境变量并没有完全进入我的应用程序。
我有一个虚拟主机,看起来像这样:

<VirtualHost *:443>
  ServerName example.com

  <Location /Shibboleth.sso>
    ProxyPass !
  </Location>

  ProxyPass / http://127.0.0.1:9292/
  ProxyPassReverse / http://127.0.0.1:9292/

  ...
</VirtualHost>

请求被代理传递到运行在Puma web服务器上的Ruby on Rails应用程序,但是当我检查request.ENV时,我看不到我的shibboleth属性。有人有类似的经验吗?

31moq8wy

31moq8wy1#

在Apache配置中设置ShibUseHeaders

<Location />
    AuthType shibboleth
    ShibRequireSession On
    ShibUseHeaders On
    Require valid-user
  </Location>

然后,您应该获取属性“HTTP_VARNAME”,并在请求之外使用它们。ENV

相关问题