Update the test-website

This commit is contained in:
Manuel Thalmann 2021-05-10 20:47:00 +00:00
parent f1a35756b3
commit 3af6253c56
8 changed files with 2589 additions and 972 deletions

View file

@ -1,3 +1,3 @@
<FilesMatch "\.(php|php3|php4|php5|phtml|inc)$">
Deny from all
Require all denied
</FilesMatch>

View 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

View 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

View file

@ -3,3 +3,14 @@ Name: myproject
---
SilverStripe\Core\Manifest\ModuleManifest:
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

View file

@ -3,13 +3,14 @@
"type": "silverstripe-recipe",
"description": "The SilverStripe Framework Installer",
"require": {
"php": ">=5.6.0",
"php": "^7.1 || ^8",
"silverstripe/recipe-plugin": "^1.2",
"silverstripe/recipe-cms": "4.4.4@stable",
"silverstripe-themes/simple": "~3.2.0"
"silverstripe/recipe-cms": "4.7.3@stable",
"silverstripe-themes/simple": "~3.2.0",
"silverstripe/login-forms": "4.3.0@stable"
},
"require-dev": {
"phpunit/phpunit": "^5.7"
"phpunit/phpunit": "^9.5"
},
"extra": {
"expose": [
@ -17,10 +18,19 @@
"themes/mantra/css",
"themes/mantra/javascript"
],
"project-files": [
"app/_config/*",
".env.example"
],
"public-files": [
"assets/*",
"favicon.ico"
],
"resources-dir": "_resources",
"project-files-installed": [
"app/.htaccess",
"app/_config.php",
"app/_config/mimevalidator.yml",
"app/_config/mysite.yml",
"app/src/Page.php",
"app/src/PageController.php"
@ -28,8 +38,6 @@
"public-files-installed": [
".htaccess",
"index.php",
"install-frameworkmissing.html",
"install.php",
"web.config"
]
},

File diff suppressed because it is too large Load diff

View file

@ -2,21 +2,17 @@
# Deny access to templates (but allow from localhost)
<Files *.ss>
Order deny,allow
Deny from all
Allow from 127.0.0.1
Require ip 127.0.0.1
</Files>
# Deny access to IIS configuration
<Files web.config>
Order deny,allow
Deny from all
Require all denied
</Files>
# Deny access to YAML configuration files which might include sensitive information
<Files ~ "\.ya?ml$">
Order allow,deny
Deny from all
Require all denied
</Files>
# 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]
# 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
RewriteRule .* index.php
</IfModule>

View file

@ -24,7 +24,7 @@ AddHandler default-handler php phtml php3 php4 php5 inc
RewriteCond %{REQUEST_FILENAME} -f
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)$
RewriteRule .* - [F]