From d8d78b3807b76bebd0c0190c273c9cdf451da731 Mon Sep 17 00:00:00 2001
From: jurgenhaas <juergen@paragon-es.de>
Date: Fri, 24 Jul 2020 15:15:31 +0200
Subject: [PATCH] composer/plugin/drupal-8-scaffold#16 Configure config split

---
 config/default/environments/develop/.htaccess | 24 +++++++++++++++++++
 .../develop}/coffee.configuration.yml         |  0
 .../develop}/stage_file_proxy.settings.yml    |  0
 config/default/environments/live/.htaccess    | 24 +++++++++++++++++++
 config/default/environments/nirvana/.htaccess | 24 +++++++++++++++++++
 .../default/environments/snapshot/.htaccess   | 24 +++++++++++++++++++
 config/default/environments/test/.htaccess    | 24 +++++++++++++++++++
 .../config_split.config_split.develop.yml     | 17 +++++++++++++
 .../sync/config_split.config_split.live.yml   | 17 +++++++++++++
 .../sync/config_split.config_split.test.yml   | 15 ++++++++++++
 config/default/sync/core.extension.yml        |  4 ----
 11 files changed, 169 insertions(+), 4 deletions(-)
 create mode 100644 config/default/environments/develop/.htaccess
 rename config/default/{sync => environments/develop}/coffee.configuration.yml (100%)
 rename config/default/{sync => environments/develop}/stage_file_proxy.settings.yml (100%)
 create mode 100644 config/default/environments/live/.htaccess
 create mode 100644 config/default/environments/nirvana/.htaccess
 create mode 100644 config/default/environments/snapshot/.htaccess
 create mode 100644 config/default/environments/test/.htaccess
 create mode 100644 config/default/sync/config_split.config_split.develop.yml
 create mode 100644 config/default/sync/config_split.config_split.live.yml
 create mode 100644 config/default/sync/config_split.config_split.test.yml

diff --git a/config/default/environments/develop/.htaccess b/config/default/environments/develop/.htaccess
new file mode 100644
index 0000000..cfee85a
--- /dev/null
+++ b/config/default/environments/develop/.htaccess
@@ -0,0 +1,24 @@
+# Deny all requests from Apache 2.4+.
+<IfModule mod_authz_core.c>
+  Require all denied
+</IfModule>
+
+# Deny all requests from Apache 2.0-2.2.
+<IfModule !mod_authz_core.c>
+  Deny from all
+</IfModule>
+
+# Turn off all options we don't need.
+Options -Indexes -ExecCGI -Includes -MultiViews
+
+# Set the catch-all handler to prevent scripts from being executed.
+SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
+<Files *>
+  # Override the handler again if we're run later in the evaluation list.
+  SetHandler Drupal_Security_Do_Not_Remove_See_SA_2013_003
+</Files>
+
+# If we know how to do it safely, disable the PHP engine entirely.
+<IfModule mod_php7.c>
+  php_flag engine off
+</IfModule>
diff --git a/config/default/sync/coffee.configuration.yml b/config/default/environments/develop/coffee.configuration.yml
similarity index 100%
rename from config/default/sync/coffee.configuration.yml
rename to config/default/environments/develop/coffee.configuration.yml
diff --git a/config/default/sync/stage_file_proxy.settings.yml b/config/default/environments/develop/stage_file_proxy.settings.yml
similarity index 100%
rename from config/default/sync/stage_file_proxy.settings.yml
rename to config/default/environments/develop/stage_file_proxy.settings.yml
diff --git a/config/default/environments/live/.htaccess b/config/default/environments/live/.htaccess
new file mode 100644
index 0000000..cfee85a
--- /dev/null
+++ b/config/default/environments/live/.htaccess
@@ -0,0 +1,24 @@
+# Deny all requests from Apache 2.4+.
+<IfModule mod_authz_core.c>
+  Require all denied
+</IfModule>
+
+# Deny all requests from Apache 2.0-2.2.
+<IfModule !mod_authz_core.c>
+  Deny from all
+</IfModule>
+
+# Turn off all options we don't need.
+Options -Indexes -ExecCGI -Includes -MultiViews
+
+# Set the catch-all handler to prevent scripts from being executed.
+SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
+<Files *>
+  # Override the handler again if we're run later in the evaluation list.
+  SetHandler Drupal_Security_Do_Not_Remove_See_SA_2013_003
+</Files>
+
+# If we know how to do it safely, disable the PHP engine entirely.
+<IfModule mod_php7.c>
+  php_flag engine off
+</IfModule>
diff --git a/config/default/environments/nirvana/.htaccess b/config/default/environments/nirvana/.htaccess
new file mode 100644
index 0000000..cfee85a
--- /dev/null
+++ b/config/default/environments/nirvana/.htaccess
@@ -0,0 +1,24 @@
+# Deny all requests from Apache 2.4+.
+<IfModule mod_authz_core.c>
+  Require all denied
+</IfModule>
+
+# Deny all requests from Apache 2.0-2.2.
+<IfModule !mod_authz_core.c>
+  Deny from all
+</IfModule>
+
+# Turn off all options we don't need.
+Options -Indexes -ExecCGI -Includes -MultiViews
+
+# Set the catch-all handler to prevent scripts from being executed.
+SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
+<Files *>
+  # Override the handler again if we're run later in the evaluation list.
+  SetHandler Drupal_Security_Do_Not_Remove_See_SA_2013_003
+</Files>
+
+# If we know how to do it safely, disable the PHP engine entirely.
+<IfModule mod_php7.c>
+  php_flag engine off
+</IfModule>
diff --git a/config/default/environments/snapshot/.htaccess b/config/default/environments/snapshot/.htaccess
new file mode 100644
index 0000000..cfee85a
--- /dev/null
+++ b/config/default/environments/snapshot/.htaccess
@@ -0,0 +1,24 @@
+# Deny all requests from Apache 2.4+.
+<IfModule mod_authz_core.c>
+  Require all denied
+</IfModule>
+
+# Deny all requests from Apache 2.0-2.2.
+<IfModule !mod_authz_core.c>
+  Deny from all
+</IfModule>
+
+# Turn off all options we don't need.
+Options -Indexes -ExecCGI -Includes -MultiViews
+
+# Set the catch-all handler to prevent scripts from being executed.
+SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
+<Files *>
+  # Override the handler again if we're run later in the evaluation list.
+  SetHandler Drupal_Security_Do_Not_Remove_See_SA_2013_003
+</Files>
+
+# If we know how to do it safely, disable the PHP engine entirely.
+<IfModule mod_php7.c>
+  php_flag engine off
+</IfModule>
diff --git a/config/default/environments/test/.htaccess b/config/default/environments/test/.htaccess
new file mode 100644
index 0000000..cfee85a
--- /dev/null
+++ b/config/default/environments/test/.htaccess
@@ -0,0 +1,24 @@
+# Deny all requests from Apache 2.4+.
+<IfModule mod_authz_core.c>
+  Require all denied
+</IfModule>
+
+# Deny all requests from Apache 2.0-2.2.
+<IfModule !mod_authz_core.c>
+  Deny from all
+</IfModule>
+
+# Turn off all options we don't need.
+Options -Indexes -ExecCGI -Includes -MultiViews
+
+# Set the catch-all handler to prevent scripts from being executed.
+SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
+<Files *>
+  # Override the handler again if we're run later in the evaluation list.
+  SetHandler Drupal_Security_Do_Not_Remove_See_SA_2013_003
+</Files>
+
+# If we know how to do it safely, disable the PHP engine entirely.
+<IfModule mod_php7.c>
+  php_flag engine off
+</IfModule>
diff --git a/config/default/sync/config_split.config_split.develop.yml b/config/default/sync/config_split.config_split.develop.yml
new file mode 100644
index 0000000..1d11077
--- /dev/null
+++ b/config/default/sync/config_split.config_split.develop.yml
@@ -0,0 +1,17 @@
+uuid: 62a0e9c3-1947-44ef-a2ed-025398417cf5
+langcode: en
+status: false
+dependencies: {  }
+id: develop
+label: Develop
+description: ''
+folder: sites/default/files/config/environments/develop
+module:
+  coffee: 0
+  stage_file_proxy: 0
+theme: {  }
+blacklist: {  }
+graylist: {  }
+graylist_dependents: true
+graylist_skip_equal: true
+weight: 0
diff --git a/config/default/sync/config_split.config_split.live.yml b/config/default/sync/config_split.config_split.live.yml
new file mode 100644
index 0000000..688afe1
--- /dev/null
+++ b/config/default/sync/config_split.config_split.live.yml
@@ -0,0 +1,17 @@
+uuid: ba269a69-7b7e-4eee-b742-6ae9f808b5bc
+langcode: en
+status: false
+dependencies: {  }
+id: live
+label: Live
+description: ''
+folder: sites/default/files/config/environments/live
+module:
+  dynamic_page_cache: 0
+  page_cache: 0
+theme: {  }
+blacklist: {  }
+graylist: {  }
+graylist_dependents: true
+graylist_skip_equal: true
+weight: 0
diff --git a/config/default/sync/config_split.config_split.test.yml b/config/default/sync/config_split.config_split.test.yml
new file mode 100644
index 0000000..9087184
--- /dev/null
+++ b/config/default/sync/config_split.config_split.test.yml
@@ -0,0 +1,15 @@
+uuid: 036753df-aab2-4003-aa2c-35969665be51
+langcode: en
+status: false
+dependencies: {  }
+id: test
+label: Test
+description: ''
+folder: sites/default/files/config/environments/test
+module: {  }
+theme: {  }
+blacklist: {  }
+graylist: {  }
+graylist_dependents: true
+graylist_skip_equal: true
+weight: 0
diff --git a/config/default/sync/core.extension.yml b/config/default/sync/core.extension.yml
index 70b5882..28daf89 100644
--- a/config/default/sync/core.extension.yml
+++ b/config/default/sync/core.extension.yml
@@ -10,7 +10,6 @@ module:
   breakpoint: 0
   captcha: 0
   ckeditor: 0
-  coffee: 0
   config: 0
   config_filter: 0
   config_split: 0
@@ -20,7 +19,6 @@ module:
   datetime: 0
   dblog: 0
   drd_agent: 0
-  dynamic_page_cache: 0
   editor: 0
   field: 0
   field_ui: 0
@@ -40,7 +38,6 @@ module:
   metatag_views: 0
   node: 0
   options: 0
-  page_cache: 0
   path: 0
   path_alias: 0
   rdf: 0
@@ -55,7 +52,6 @@ module:
   sitemap: 0
   smart_date: 0
   smtp: 0
-  stage_file_proxy: 0
   syslog: 0
   system: 0
   taxonomy: 0
-- 
GitLab