Update the test-website
This commit is contained in:
parent
f1a35756b3
commit
3af6253c56
8 changed files with 2589 additions and 972 deletions
|
@ -1,3 +1,3 @@
|
||||||
<FilesMatch "\.(php|php3|php4|php5|phtml|inc)$">
|
<FilesMatch "\.(php|php3|php4|php5|phtml|inc)$">
|
||||||
Deny from all
|
Require all denied
|
||||||
</FilesMatch>
|
</FilesMatch>
|
||||||
|
|
26
test/website/app/_config/assets.yml
Normal file
26
test/website/app/_config/assets.yml
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
# SilverStripe 4.4 changes the way files are resolved. `silverstripe-assets` resolves files using a variety of formats
|
||||||
|
# by default. When starting a brand new project on SilverStripe 4.4 or greater, those extra formats are not needed and
|
||||||
|
# will slowdown file resolution requests a bit. This config removes those redundant formats.
|
||||||
|
|
||||||
|
---
|
||||||
|
Name: project-assetsflysystem
|
||||||
|
After: '#assetsflysystem'
|
||||||
|
---
|
||||||
|
SilverStripe\Core\Injector\Injector:
|
||||||
|
# Define public resolution strategy
|
||||||
|
SilverStripe\Assets\FilenameParsing\FileResolutionStrategy.public:
|
||||||
|
class: SilverStripe\Assets\FilenameParsing\FileIDHelperResolutionStrategy
|
||||||
|
properties:
|
||||||
|
ResolutionFileIDHelpers:
|
||||||
|
- '%$SilverStripe\Assets\FilenameParsing\HashFileIDHelper'
|
||||||
|
- '%$SilverStripe\Assets\FilenameParsing\NaturalFileIDHelper'
|
||||||
|
DefaultFileIDHelper: '%$SilverStripe\Assets\FilenameParsing\NaturalFileIDHelper'
|
||||||
|
VersionedStage: Live
|
||||||
|
# Define protected resolution strategy
|
||||||
|
SilverStripe\Assets\FilenameParsing\FileResolutionStrategy.protected:
|
||||||
|
class: SilverStripe\Assets\FilenameParsing\FileIDHelperResolutionStrategy
|
||||||
|
properties:
|
||||||
|
DefaultFileIDHelper: '%$SilverStripe\Assets\FilenameParsing\HashFileIDHelper'
|
||||||
|
ResolutionFileIDHelpers:
|
||||||
|
- '%$SilverStripe\Assets\FilenameParsing\HashFileIDHelper'
|
||||||
|
VersionedStage: Stage
|
9
test/website/app/_config/mimevalidator.yml
Normal file
9
test/website/app/_config/mimevalidator.yml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
---
|
||||||
|
Name: app-mimeuploadvalidator
|
||||||
|
After: '#mimeuploadvalidator'
|
||||||
|
Only:
|
||||||
|
moduleexists: 'silverstripe/mimevalidator'
|
||||||
|
---
|
||||||
|
SilverStripe\Core\Injector\Injector:
|
||||||
|
SilverStripe\Assets\Upload_Validator:
|
||||||
|
class: SilverStripe\MimeValidator\MimeUploadValidator
|
|
@ -3,3 +3,14 @@ Name: myproject
|
||||||
---
|
---
|
||||||
SilverStripe\Core\Manifest\ModuleManifest:
|
SilverStripe\Core\Manifest\ModuleManifest:
|
||||||
project: app
|
project: app
|
||||||
|
|
||||||
|
# UTF8MB4 has limited support in older MySQL versions.
|
||||||
|
# Remove this configuration if you experience issues.
|
||||||
|
---
|
||||||
|
Name: myproject-database
|
||||||
|
---
|
||||||
|
SilverStripe\ORM\Connect\MySQLDatabase:
|
||||||
|
connection_charset: utf8mb4
|
||||||
|
connection_collation: utf8mb4_unicode_ci
|
||||||
|
charset: utf8mb4
|
||||||
|
collation: utf8mb4_unicode_ci
|
||||||
|
|
|
@ -3,13 +3,14 @@
|
||||||
"type": "silverstripe-recipe",
|
"type": "silverstripe-recipe",
|
||||||
"description": "The SilverStripe Framework Installer",
|
"description": "The SilverStripe Framework Installer",
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.6.0",
|
"php": "^7.1 || ^8",
|
||||||
"silverstripe/recipe-plugin": "^1.2",
|
"silverstripe/recipe-plugin": "^1.2",
|
||||||
"silverstripe/recipe-cms": "4.4.4@stable",
|
"silverstripe/recipe-cms": "4.7.3@stable",
|
||||||
"silverstripe-themes/simple": "~3.2.0"
|
"silverstripe-themes/simple": "~3.2.0",
|
||||||
|
"silverstripe/login-forms": "4.3.0@stable"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "^5.7"
|
"phpunit/phpunit": "^9.5"
|
||||||
},
|
},
|
||||||
"extra": {
|
"extra": {
|
||||||
"expose": [
|
"expose": [
|
||||||
|
@ -17,10 +18,19 @@
|
||||||
"themes/mantra/css",
|
"themes/mantra/css",
|
||||||
"themes/mantra/javascript"
|
"themes/mantra/javascript"
|
||||||
],
|
],
|
||||||
|
"project-files": [
|
||||||
|
"app/_config/*",
|
||||||
|
".env.example"
|
||||||
|
],
|
||||||
|
"public-files": [
|
||||||
|
"assets/*",
|
||||||
|
"favicon.ico"
|
||||||
|
],
|
||||||
"resources-dir": "_resources",
|
"resources-dir": "_resources",
|
||||||
"project-files-installed": [
|
"project-files-installed": [
|
||||||
"app/.htaccess",
|
"app/.htaccess",
|
||||||
"app/_config.php",
|
"app/_config.php",
|
||||||
|
"app/_config/mimevalidator.yml",
|
||||||
"app/_config/mysite.yml",
|
"app/_config/mysite.yml",
|
||||||
"app/src/Page.php",
|
"app/src/Page.php",
|
||||||
"app/src/PageController.php"
|
"app/src/PageController.php"
|
||||||
|
@ -28,8 +38,6 @@
|
||||||
"public-files-installed": [
|
"public-files-installed": [
|
||||||
".htaccess",
|
".htaccess",
|
||||||
"index.php",
|
"index.php",
|
||||||
"install-frameworkmissing.html",
|
|
||||||
"install.php",
|
|
||||||
"web.config"
|
"web.config"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
3476
test/website/composer.lock
generated
3476
test/website/composer.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -2,21 +2,17 @@
|
||||||
|
|
||||||
# Deny access to templates (but allow from localhost)
|
# Deny access to templates (but allow from localhost)
|
||||||
<Files *.ss>
|
<Files *.ss>
|
||||||
Order deny,allow
|
Require ip 127.0.0.1
|
||||||
Deny from all
|
|
||||||
Allow from 127.0.0.1
|
|
||||||
</Files>
|
</Files>
|
||||||
|
|
||||||
# Deny access to IIS configuration
|
# Deny access to IIS configuration
|
||||||
<Files web.config>
|
<Files web.config>
|
||||||
Order deny,allow
|
Require all denied
|
||||||
Deny from all
|
|
||||||
</Files>
|
</Files>
|
||||||
|
|
||||||
# Deny access to YAML configuration files which might include sensitive information
|
# Deny access to YAML configuration files which might include sensitive information
|
||||||
<Files ~ "\.ya?ml$">
|
<Files ~ "\.ya?ml$">
|
||||||
Order allow,deny
|
Require all denied
|
||||||
Deny from all
|
|
||||||
</Files>
|
</Files>
|
||||||
|
|
||||||
# Route errors to static pages automatically generated by SilverStripe
|
# Route errors to static pages automatically generated by SilverStripe
|
||||||
|
@ -45,9 +41,6 @@ ErrorDocument 500 /assets/error-500.html
|
||||||
RewriteRule (error|silverstripe|debug)\.log - [F,L,NC]
|
RewriteRule (error|silverstripe|debug)\.log - [F,L,NC]
|
||||||
|
|
||||||
# Process through SilverStripe if no file with the requested name exists.
|
# Process through SilverStripe if no file with the requested name exists.
|
||||||
# Pass through the original path as a query parameter, and retain the existing parameters.
|
|
||||||
# Try finding framework in the vendor folder first
|
|
||||||
RewriteCond %{REQUEST_URI} ^(.*)$
|
|
||||||
RewriteCond %{REQUEST_FILENAME} !-f
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
RewriteRule .* index.php
|
RewriteRule .* index.php
|
||||||
</IfModule>
|
</IfModule>
|
||||||
|
|
|
@ -24,7 +24,7 @@ AddHandler default-handler php phtml php3 php4 php5 inc
|
||||||
RewriteCond %{REQUEST_FILENAME} -f
|
RewriteCond %{REQUEST_FILENAME} -f
|
||||||
RewriteRule error[^\\/]*\.html$ - [L]
|
RewriteRule error[^\\/]*\.html$ - [L]
|
||||||
|
|
||||||
# Block invalid file extensions
|
# Allow specific file extensions
|
||||||
RewriteCond %{REQUEST_URI} !^[^.]*[^\/]*\.(?i:css|js|ace|arc|arj|asf|au|avi|bmp|bz2|cab|cda|csv|dmg|doc|docx|dotx|flv|gif|gpx|gz|hqx|ico|jpeg|jpg|kml|m4a|m4v|mid|midi|mkv|mov|mp3|mp4|mpa|mpeg|mpg|ogg|ogv|pages|pcx|pdf|png|pps|ppt|pptx|potx|ra|ram|rm|rtf|sit|sitx|tar|tgz|tif|tiff|txt|wav|webm|wma|wmv|xls|xlsx|xltx|zip|zipx|graphql)$
|
RewriteCond %{REQUEST_URI} !^[^.]*[^\/]*\.(?i:css|js|ace|arc|arj|asf|au|avi|bmp|bz2|cab|cda|csv|dmg|doc|docx|dotx|flv|gif|gpx|gz|hqx|ico|jpeg|jpg|kml|m4a|m4v|mid|midi|mkv|mov|mp3|mp4|mpa|mpeg|mpg|ogg|ogv|pages|pcx|pdf|png|pps|ppt|pptx|potx|ra|ram|rm|rtf|sit|sitx|tar|tgz|tif|tiff|txt|wav|webm|wma|wmv|xls|xlsx|xltx|zip|zipx|graphql)$
|
||||||
RewriteRule .* - [F]
|
RewriteRule .* - [F]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue