Include static file cache
This commit is contained in:
@@ -23,6 +23,7 @@
|
|||||||
"kigkonsult/icalcreator": "^2.29",
|
"kigkonsult/icalcreator": "^2.29",
|
||||||
"league/csv": "^9.2",
|
"league/csv": "^9.2",
|
||||||
"league/period": "^4.9",
|
"league/period": "^4.9",
|
||||||
|
"lochmueller/staticfilecache": "^10.2",
|
||||||
"pixelant/pxa-social-feed": "^2.0",
|
"pixelant/pxa-social-feed": "^2.0",
|
||||||
"symfony/http-client": "^4.3",
|
"symfony/http-client": "^4.3",
|
||||||
"symfony/options-resolver": "^4.2",
|
"symfony/options-resolver": "^4.2",
|
||||||
|
|||||||
Generated
+80
-3
@@ -4,7 +4,7 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "3c9082df3930a24daad45b684ce6c58a",
|
"content-hash": "8d24d6aa5cf407f4ae9811bc6a781623",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "algo26-matthias/idna-convert",
|
"name": "algo26-matthias/idna-convert",
|
||||||
@@ -1197,9 +1197,9 @@
|
|||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"name": "Helmut Hummel",
|
"name": "Helmut Hummel",
|
||||||
"role": "Developer",
|
|
||||||
"email": "[email protected]",
|
"email": "[email protected]",
|
||||||
"homepage": "http://helhum.io"
|
"homepage": "http://helhum.io",
|
||||||
|
"role": "Developer"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "A reliable and powerful command line interface for TYPO3 CMS",
|
"description": "A reliable and powerful command line interface for TYPO3 CMS",
|
||||||
@@ -1476,6 +1476,83 @@
|
|||||||
],
|
],
|
||||||
"time": "2019-09-02T06:27:10+00:00"
|
"time": "2019-09-02T06:27:10+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "lochmueller/staticfilecache",
|
||||||
|
"version": "10.2.1",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/lochmueller/staticfilecache.git",
|
||||||
|
"reference": "63dc21dabc1a7dc226045c460ffa77134506a43e"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/lochmueller/staticfilecache/zipball/63dc21dabc1a7dc226045c460ffa77134506a43e",
|
||||||
|
"reference": "63dc21dabc1a7dc226045c460ffa77134506a43e",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"ext-pdo": "*",
|
||||||
|
"ext-zlib": "*",
|
||||||
|
"php": "^7.2||^7.3",
|
||||||
|
"typo3/cms-core": "^9.5||^10.2",
|
||||||
|
"typo3/cms-extbase": "^9.5||^10.2",
|
||||||
|
"typo3/cms-frontend": "^9.5||^10.2"
|
||||||
|
},
|
||||||
|
"replace": {
|
||||||
|
"typo3-ter/staticfilecache": "self.version"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"friendsofphp/php-cs-fixer": "^2.14",
|
||||||
|
"namelesscoder/typo3-repository-client": "^2.0",
|
||||||
|
"phpmd/phpmd": "^2.6",
|
||||||
|
"phpmetrics/phpmetrics": "^2.4",
|
||||||
|
"rector/rector": "^0.4",
|
||||||
|
"scrutinizer/ocular": "^1.5",
|
||||||
|
"squizlabs/php_codesniffer": "^3.4",
|
||||||
|
"typo3/testing-framework": "^4.2"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"friendsofsymfony/http-cache": "For HTTP proxy cache services like Varnish",
|
||||||
|
"lochmueller/seocli": "Scan websites against SEO criteria and/or trigger the indexing process and cache warming in deployment scripts"
|
||||||
|
},
|
||||||
|
"type": "typo3-cms-extension",
|
||||||
|
"extra": {
|
||||||
|
"typo3/cms": {
|
||||||
|
"extension-key": "staticfilecache",
|
||||||
|
"cms-package-dir": "{$vendor-dir}/typo3/cms",
|
||||||
|
"web-dir": ".Build/Web"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"SFC\\Staticfilecache\\": "Classes"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"GPL-2.0-or-later"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Tim Lochmüller",
|
||||||
|
"email": "[email protected]",
|
||||||
|
"homepage": "https://github.com/lochmueller",
|
||||||
|
"role": "Developer"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Transparent StaticFileCache solution using mod_rewrite and mod_expires. Increase performance for static pages by a factor of 230!!",
|
||||||
|
"homepage": "https://github.com/lochmueller/staticfilecache",
|
||||||
|
"keywords": [
|
||||||
|
"StaticFileCache",
|
||||||
|
"TYPO3 CMS",
|
||||||
|
"cache",
|
||||||
|
"file",
|
||||||
|
"magic",
|
||||||
|
"speed",
|
||||||
|
"static"
|
||||||
|
],
|
||||||
|
"time": "2019-12-09T08:17:21+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "nikic/php-parser",
|
"name": "nikic/php-parser",
|
||||||
"version": "v4.3.0",
|
"version": "v4.3.0",
|
||||||
|
|||||||
@@ -292,6 +292,162 @@ AddDefaultCharset utf-8
|
|||||||
# NOTE: Add your additional local storages here
|
# NOTE: Add your additional local storages here
|
||||||
RewriteRule ^(?:typo3/|fileadmin/|typo3conf/|typo3temp/|uploads/|favicon\.ico) - [L]
|
RewriteRule ^(?:typo3/|fileadmin/|typo3conf/|typo3temp/|uploads/|favicon\.ico) - [L]
|
||||||
|
|
||||||
|
### Begin: StaticFileCache (preparation) ####
|
||||||
|
|
||||||
|
# Document root configuration
|
||||||
|
RewriteRule .* - [E=SFC_ROOT:%{DOCUMENT_ROOT}]
|
||||||
|
|
||||||
|
# Cleanup URI
|
||||||
|
RewriteCond %{REQUEST_URI} ^.*$
|
||||||
|
RewriteRule .* - [E=SFC_URI:/%{REQUEST_URI}]
|
||||||
|
RewriteCond %{REQUEST_URI} ^/.*$
|
||||||
|
RewriteRule .* - [E=SFC_URI:%{REQUEST_URI}]
|
||||||
|
RewriteCond %{REQUEST_URI} ^/?$
|
||||||
|
RewriteRule .* - [E=SFC_URI:/]
|
||||||
|
|
||||||
|
# Cleanup HOST
|
||||||
|
RewriteCond %{HTTP_HOST} ^([^:]+)(:[0-9]+)?$
|
||||||
|
RewriteRule .* - [E=SFC_HOST:%1]
|
||||||
|
|
||||||
|
# Disable cache for EXT:solr indexing requests
|
||||||
|
RewriteCond %{HTTP:X-Tx-Solr-Iq} .+
|
||||||
|
RewriteRule .* - [E=SFC_HOST:invalid-host]
|
||||||
|
|
||||||
|
# Get scheme
|
||||||
|
RewriteRule .* - [E=SFC_PROTOCOL:http]
|
||||||
|
RewriteCond %{SERVER_PORT} ^443$ [OR]
|
||||||
|
RewriteCond %{HTTP:X-Forwarded-Proto} https
|
||||||
|
RewriteRule .* - [E=SFC_PROTOCOL:https]
|
||||||
|
|
||||||
|
# Get port
|
||||||
|
RewriteRule .* - [E=SFC_PORT:80]
|
||||||
|
RewriteCond %{ENV:SFC_PROTOCOL} ^https$ [NC]
|
||||||
|
RewriteRule .* - [E=SFC_PORT:443]
|
||||||
|
RewriteCond %{SERVER_PORT} ^[0-9]+$
|
||||||
|
RewriteRule .* - [E=SFC_PORT:%{SERVER_PORT}]
|
||||||
|
RewriteCond %{HTTP:X-Forwarded-Port} ^[0-9]+$
|
||||||
|
RewriteRule .* - [E=SFC_PORT:%{HTTP:X-Forwarded-Port}]
|
||||||
|
|
||||||
|
# Full path for redirect
|
||||||
|
RewriteRule .* - [E=SFC_FULLPATH:typo3temp/tx_staticfilecache/%{ENV:SFC_PROTOCOL}_%{ENV:SFC_HOST}_%{ENV:SFC_PORT}%{ENV:SFC_URI}/index]
|
||||||
|
|
||||||
|
# Extension (Order: br, gzip, default)
|
||||||
|
RewriteRule .* - [E=SFC_EXT:]
|
||||||
|
RewriteCond %{HTTP:Accept-Encoding} br [NC]
|
||||||
|
RewriteRule .* - [E=SFC_EXT:.br]
|
||||||
|
RewriteCond %{ENV:SFC_ROOT}/%{ENV:SFC_FULLPATH}%{ENV:SFC_EXT} !-f
|
||||||
|
RewriteRule .* - [E=SFC_EXT:]
|
||||||
|
RewriteCond %{ENV:SFC_EXT} ^$
|
||||||
|
RewriteCond %{HTTP:Accept-Encoding} gzip [NC]
|
||||||
|
RewriteRule .* - [E=SFC_EXT:.gz]
|
||||||
|
RewriteCond %{ENV:SFC_EXT} ^\.gz$
|
||||||
|
RewriteCond %{ENV:SFC_ROOT}/%{ENV:SFC_FULLPATH}%{ENV:SFC_EXT} !-f
|
||||||
|
RewriteRule .* - [E=SFC_EXT:]
|
||||||
|
|
||||||
|
# Write Extension to SFC_FULLPATH
|
||||||
|
RewriteRule .* - [E=SFC_FULLPATH:%{ENV:SFC_FULLPATH}%{ENV:SFC_EXT}]
|
||||||
|
|
||||||
|
### Begin: StaticFileCache (main) ####
|
||||||
|
|
||||||
|
# We only redirect URI's without query strings
|
||||||
|
RewriteCond %{QUERY_STRING} ^$
|
||||||
|
|
||||||
|
# It only makes sense to do the other checks if a static file actually exists.
|
||||||
|
RewriteCond %{ENV:SFC_ROOT}/%{ENV:SFC_FULLPATH} -f
|
||||||
|
|
||||||
|
# NO frontend or backend user is logged in. Logged in users may see different
|
||||||
|
# information than anonymous users. But the anonymous version is cached. So
|
||||||
|
# don't show the anonymous version to logged in users.
|
||||||
|
RewriteCond %{HTTP_COOKIE} !staticfilecache [NC]
|
||||||
|
|
||||||
|
# We only redirect GET requests
|
||||||
|
RewriteCond %{REQUEST_METHOD} GET
|
||||||
|
|
||||||
|
# Rewrite the request to the static file.
|
||||||
|
RewriteRule .* %{ENV:SFC_ROOT}/%{ENV:SFC_FULLPATH} [L]
|
||||||
|
|
||||||
|
# Do not allow direct call the cache entries
|
||||||
|
RewriteCond %{ENV:SFC_URI} ^/typo3temp/tx_staticfilecache/.*
|
||||||
|
RewriteCond %{ENV:REDIRECT_STATUS} ^$
|
||||||
|
RewriteRule .* - [F,L]
|
||||||
|
|
||||||
|
# Handle application cache
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-l
|
||||||
|
RewriteRule ^.*\.sfc$ %{ENV:CWD}index.php?eID=sfc_manifest [QSA,L]
|
||||||
|
|
||||||
|
### Begin: StaticFileCache (options) ####
|
||||||
|
|
||||||
|
# Set proper content type and encoding for gzipped html.
|
||||||
|
<FilesMatch "\.gzip$">
|
||||||
|
SetEnv no-gzip 1
|
||||||
|
SetEnv no-brotli 1
|
||||||
|
<IfModule mod_headers.c>
|
||||||
|
Header set Content-Encoding gzip
|
||||||
|
</IfModule>
|
||||||
|
</FilesMatch>
|
||||||
|
<FilesMatch "\.gz$">
|
||||||
|
SetEnv no-gzip 1
|
||||||
|
SetEnv no-brotli 1
|
||||||
|
<IfModule mod_headers.c>
|
||||||
|
Header set Content-Encoding gzip
|
||||||
|
</IfModule>
|
||||||
|
</FilesMatch>
|
||||||
|
<FilesMatch "\.br$">
|
||||||
|
SetEnv no-gzip 1
|
||||||
|
SetEnv no-brotli 1
|
||||||
|
<IfModule mod_headers.c>
|
||||||
|
Header set Content-Encoding br
|
||||||
|
</IfModule>
|
||||||
|
</FilesMatch>
|
||||||
|
|
||||||
|
# if there are same problems with ForceType, please try the AddType alternative
|
||||||
|
# Set proper content type gzipped html
|
||||||
|
<FilesMatch "\.html\.gzip$">
|
||||||
|
ForceType text/html
|
||||||
|
# AddType "text/html" .gzip
|
||||||
|
</FilesMatch>
|
||||||
|
<FilesMatch "\.xml\.gzip$">
|
||||||
|
ForceType text/xml
|
||||||
|
# AddType "text/xml" .gzip
|
||||||
|
</FilesMatch>
|
||||||
|
<FilesMatch "\.rss\.gzip$">
|
||||||
|
ForceType text/xml
|
||||||
|
# AddType "text/xml" .gzip
|
||||||
|
</FilesMatch>
|
||||||
|
<FilesMatch "\.html\.gz$">
|
||||||
|
ForceType text/html
|
||||||
|
# AddType "text/html" .gz
|
||||||
|
</FilesMatch>
|
||||||
|
<FilesMatch "\.xml\.gz$">
|
||||||
|
ForceType text/xml
|
||||||
|
# AddType "text/xml" .gz
|
||||||
|
</FilesMatch>
|
||||||
|
<FilesMatch "\.rss\.gz$">
|
||||||
|
ForceType text/xml
|
||||||
|
# AddType "text/xml" .gz
|
||||||
|
</FilesMatch>
|
||||||
|
<FilesMatch "\.html\.br$">
|
||||||
|
ForceType text/html
|
||||||
|
# AddType "text/html" .br
|
||||||
|
</FilesMatch>
|
||||||
|
<FilesMatch "\.xml\.br$">
|
||||||
|
ForceType text/xml
|
||||||
|
# AddType "text/xml" .br
|
||||||
|
</FilesMatch>
|
||||||
|
<FilesMatch "\.rss\.br$">
|
||||||
|
ForceType text/xml
|
||||||
|
# AddType "text/xml" .br
|
||||||
|
</FilesMatch>
|
||||||
|
|
||||||
|
# Avoid .br files being delivered with Content-Language: br headers
|
||||||
|
<IfModule mod_mime.c>
|
||||||
|
RemoveLanguage .br
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
### End: StaticFileCache ###
|
||||||
|
|
||||||
# If the file/symlink/directory does not exist => Redirect to index.php.
|
# If the file/symlink/directory does not exist => Redirect to index.php.
|
||||||
# For httpd.conf, you need to prefix each '%{REQUEST_FILENAME}' with '%{DOCUMENT_ROOT}'.
|
# For httpd.conf, you need to prefix each '%{REQUEST_FILENAME}' with '%{DOCUMENT_ROOT}'.
|
||||||
RewriteCond %{REQUEST_FILENAME} !-f
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
|||||||
Reference in New Issue
Block a user