Added a SAML_BEHIND_PROXY env, which must be set if Part-DB is behind a reverse proxy when using SAML

The php-saml library use its own logic to determine the current path, and we need to set the use_proxy_vars so that  it respects the proxy FORWARDED headers.

This should fix issue #436
This commit is contained in:
Jan Böhmer 2023-11-25 01:45:08 +01:00
parent 07535c26a6
commit 83d43d931c
5 changed files with 12 additions and 1 deletions

3
.env
View file

@ -163,6 +163,9 @@ PROVIDER_MOUSER_SEARCH_WITH_SIGNUP_LANGUAGE='true'
# Set this to 1 to enable SAML single sign on
SAML_ENABLED=0
# Set to 1, if your Part-DB installation is behind a reverse proxy and you want to use SAML
SAML_BEHIND_PROXY=0
# A JSON encoded array of role mappings in the form { "saml_role": PARTDB_GROUP_ID, "*": PARTDB_GROUP_ID }
# The first match is used, so the order is important! Put the group mapping with the most privileges first.
# Please not to only use single quotes to enclose the JSON string