|
18 | 18 | exit("Set env var SIMPLESAMLPHP_TRUSTED_DOMAIN to the wiki's domain so SimpleSAMLphp knows it's safe."); |
19 | 19 | } |
20 | 20 | if (!isset($_ENV['SIMPLESAMLPHP_BASEURL'])) { |
21 | | - exit("Set env var SIMPLESAMLPHP_BASEURL to the SP's expected base url, e.g.: https://wiki.ubc.ca/_saml2/"); |
| 21 | + exit("Set env var SIMPLESAMLPHP_BASEURL to the SP's expected base url, e.g.: https://wiki.ubc.ca"); |
| 22 | +} |
| 23 | +if (!isset($_ENV['SIMPLESAMLPHP_BASEURLPATH'])) { |
| 24 | + exit("Set env var SIMPLESAMLPHP_BASEURLPATH to the SP's expected path, e.g.: https://wiki.ubc.ca/_saml2/"); |
22 | 25 | } |
23 | 26 | if (!is_dir('/var/www/simplesamlphp/cert')) { |
24 | 27 | exit("Missing cert directory, generate key+cert and mount them into /var/www/simplesamlphp/cert"); |
|
55 | 58 | * external url, no matter where you come from (direct access or via the |
56 | 59 | * reverse proxy). |
57 | 60 | */ |
58 | | - 'baseurlpath' => $_ENV['SIMPLESAMLPHP_BASEURL'], |
| 61 | + 'baseurlpath' => $_ENV['SIMPLESAMLPHP_BASEURLPATH'], |
59 | 62 |
|
60 | 63 | /* |
61 | 64 | * The 'application' configuration array groups a set configuration options |
|
76 | 79 | * need to compute the right URLs yourself and pass them dynamically |
77 | 80 | * to SimpleSAMLphp's API. |
78 | 81 | */ |
79 | | - //'baseURL' => 'https://example.com', |
| 82 | + 'baseURL' => $_ENV['SIMPLESAMLPHP_BASEURL'], |
80 | 83 | ], |
81 | 84 |
|
82 | 85 | /* |
|
389 | 392 | * must exist and be writable for SimpleSAMLphp. If set to something else, set |
390 | 393 | * loggingdir above to 'null'. |
391 | 394 | */ |
392 | | - 'logging.level' => SimpleSAML\Logger::NOTICE, |
393 | | - 'logging.handler' => 'syslog', |
| 395 | + 'logging.level' => SimpleSAML\Logger::INFO, |
| 396 | + 'logging.handler' => 'stderr', |
394 | 397 |
|
395 | 398 | /* |
396 | 399 | * Specify the format of the logs. Its use varies depending on the log handler used (for instance, you cannot |
|
656 | 659 | * |
657 | 660 | * If unset, SimpleSAMLphp will try to automatically determine the right value |
658 | 661 | */ |
659 | | - //'session.cookie.secure' => true, |
| 662 | + 'session.cookie.secure' => str_starts_with($_ENV['SIMPLESAMLPHP_BASEURL'], 'https') ? true : false, |
660 | 663 |
|
661 | 664 | /* |
662 | 665 | * Set the SameSite attribute in the cookie. |
|
0 commit comments