Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
207 changes: 135 additions & 72 deletions php81-unit/conf.json
Original file line number Diff line number Diff line change
@@ -1,87 +1,150 @@
{
"listeners": {
"*:80": {
"pass": "routes"
"pass": "routes/drupal"
}
},
"routes": [
{
"match": {
"uri": [
"!*/.well-known/*",
"/vendor/*",
"/core/profiles/demo_umami/modules/demo_umami_content/default_content/*",
"*.engine",
"*.inc",
"*.install",
"*.make",
"*.module",
"*.po",
"*.profile",
"*.sh",
"*.theme",
"*.tpl",
"*.twig",
"*.xtmpl",
"*.yml",
"*/.*",
"*/Entries*",
"*/Repository",
"*/Root",
"*/Tag",
"*/Template",
"*/composer.json",
"*/composer.lock",
"*/web.config",
"*sql",
"*.bak",
"*.orig",
"*.save",
"*.swo",
"*.swp",
"*~"
]
"routes": {
"drupal": [
{
"match": {
"uri": [
"!*/.well-known/*",
"/vendor/*",
"/core/profiles/demo_umami/modules/demo_umami_content/default_content/*",
"*.engine",
"*.inc",
"*.install",
"*.make",
"*.module",
"*.po",
"*.profile",
"*.sh",
"*.theme",
"*.tpl",
"*.twig",
"*.xtmpl",
"*.yml",
"*/.*",
"*/Entries*",
"*/Repository",
"*/Root",
"*/Tag",
"*/Template",
"*/composer.json",
"*/composer.lock",
"*/web.config",
"*sql",
"*.bak",
"*.orig",
"*.save",
"*.swo",
"*.swp",
"*~"
]
},
"action": {
"return": 404
}
},
"action": {
"return": 404
}
},
{
"match": {
"uri": [
"/core/authorize.php",
"/core/install.php",
"/core/modules/statistics/statistics.php",
"~^/core/modules/system/tests/https?\\.php",
"/core/rebuild.php",
"/update.php",
"/update.php/*"
]
{
"match": {
"uri": [
"/core/authorize.php",
"/core/install.php",
"/core/modules/statistics/statistics.php",
"~^/core/modules/system/tests/https?\\.php",
"/core/rebuild.php",
"/update.php",
"/update.php/*"
]
},
"action": {
"pass": "applications/drupal/direct"
}
},
{
"match": {
"uri": [
"!/index.php*",
"*.php"
]
},
"action": {
"return": 405
}
},
{
"match": {
"uri": [
"*.css",
"*.js"
Copy link
Contributor Author

@andypost andypost Jun 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs better mask for dynamic assets

  • RewriteRule ^(.*css_[a-zA-Z0-9-_]+)\.css$ $1\.css\.br [QSA]
  • RewriteRule ^(.*js_[a-zA-Z0-9-_]+)\.js$ $1\.js\.br [QSA]

]
},
"action": {
"pass": "routes/assets_brotli"
}
},
"action": {
"pass": "applications/drupal/direct"
{
"action": {
"share": "/var/www/html/web$uri",
"fallback": {
"pass": "applications/drupal/index"
}
}
}
},
{
"match": {
"uri": [
"!/index.php*",
"*.php"
]
],
"assets_brotli": [
{
"match": {
"headers": [
{
"Accept-Encoding": "*br*"
}
]
},
"action": {
"share": "/var/www/html/web$uri.br",
"fallback": {
"pass": "routes/assets_gzip"
}
}
},
"action": {
"return": 404
{
"action": {
"pass": "routes/assets_gzip"
}
}
},
{
"action": {
"share": "/var/www/html/web$uri",
"fallback": {
"pass": "applications/drupal/index"
],
"assets_gzip": [
{
"match": {
"headers": [
{
"Accept-Encoding": "*gzip*"
}
]
},
"action": {
"share": [
"/var/www/html/web$uri.gz",
"/var/www/html/web$uri"
],
"fallback": {
"return": 404
}
}
},
{
"action": {
"share": "/var/www/html/web$uri",
"fallback": {
"return": 404
}
}
}
}
],
]
},
"applications": {
"drupal": {
"type": "php",
Expand Down