summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColan Schwartz2019-01-17 21:59:19 (GMT)
committerColan Schwartz2019-01-17 21:59:19 (GMT)
commit626769e88ab0472b2f444d3f54786941f63b8793 (patch)
treee82115b838bdad45e5fbdfd7c0fecb9b14850651
parentd806d4aaf21038068bf634b1a5e3840b5805c5b9 (diff)
Issue #3025905 by colan: Set the cookie domain for subdirectory sites.issue-3025905
-rw-r--r--Provision/Config/Drupal/provision_drupal_settings_8.tpl.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/Provision/Config/Drupal/provision_drupal_settings_8.tpl.php b/Provision/Config/Drupal/provision_drupal_settings_8.tpl.php
index 79c3728..d4b5eea 100644
--- a/Provision/Config/Drupal/provision_drupal_settings_8.tpl.php
+++ b/Provision/Config/Drupal/provision_drupal_settings_8.tpl.php
@@ -22,8 +22,13 @@ print '<?php' ?>
* Detecting subdirectory mode
*/
if (isset($_SERVER['SITE_SUBDIR']) && isset($_SERVER['RAW_HOST'])) {
+ // Possibly not needed. See https://www.drupal.org/project/drupal/issues/2753591.
$base_url = 'http://' . $_SERVER['RAW_HOST'] . '/' . $_SERVER['SITE_SUBDIR'];
+
ini_set('session.cookie_path', '/' . $_SERVER['SITE_SUBDIR'] . '/');
+
+ // Set the cookie domain, necessary if setting the cookie path.
+ $settings['container_yamls'][] = __DIR__ . '/subdirs.services.yml';
}
<?php endif; ?>