Skip to content

Commit

Permalink
Merge pull request #256 from silinternational/feature/tusted-url-domains
Browse files Browse the repository at this point in the history
set trusted.url.domains using an environment variable
  • Loading branch information
briskt authored Jul 17, 2024
2 parents 861dd68 + ae1a6a1 commit d84aaab
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dockerbuild/config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

use Sil\PhpEnv\Env;
use Sil\PhpEnv\EnvVarNotFoundException;
use SimpleSAML\Utils;
use SimpleSAML\Module\material\MaterialController;
use SimpleSAML\Utils;

$httpUtils = new Utils\HTTP();

Expand Down Expand Up @@ -71,6 +71,7 @@
$PASSWORD_CHANGE_URL = Env::get('PASSWORD_CHANGE_URL');
$PASSWORD_FORGOT_URL = Env::get('PASSWORD_FORGOT_URL');
$HELP_CENTER_URL = Env::get('HELP_CENTER_URL');
$TRUSTED_URL_DOMAINS = Env::getArray('TRUSTED_URL_DOMAINS', []);

$config = [

Expand Down Expand Up @@ -323,7 +324,7 @@
* Example:
* 'trusted.url.domains' => ['sp.example.com', 'app.example.com'],
*/
'trusted.url.domains' => null,
'trusted.url.domains' => $TRUSTED_URL_DOMAINS,

/*
* Enable regular expression matching of trusted.url.domains.
Expand Down
3 changes: 3 additions & 0 deletions local.env.dist
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,6 @@ TRUSTED_IP_ADDRESSES=
# See "https://developers.google.com/recaptcha/docs/faq" for test key/secret.
RECAPTCHA_SITE_KEY=
RECAPTCHA_SECRET=

# A comma-separated list of domains trusted for redirect. Should include, at a minimum, all logout redirect URL domains.
TRUSTED_URL_DOMAINS=

0 comments on commit d84aaab

Please sign in to comment.