bunkerweb 1.4.0
This commit is contained in:
4
core/clientcache/confs/http/client-cache.conf
Normal file
4
core/clientcache/confs/http/client-cache.conf
Normal file
@@ -0,0 +1,4 @@
|
||||
map $uri $cache_control {
|
||||
default "";
|
||||
"~\.({{ CLIENT_CACHE_EXTENSIONS }})$" "{{ CLIENT_CACHE_CONTROL }}";
|
||||
}
|
||||
8
core/clientcache/confs/server-http/client-cache.conf
Normal file
8
core/clientcache/confs/server-http/client-cache.conf
Normal file
@@ -0,0 +1,8 @@
|
||||
{% if USE_CLIENT_CACHE == "yes" +%}
|
||||
add_header Cache-Control $cache_control;
|
||||
{% if CLIENT_CACHE_ETAG == "yes" and SERVE_FILES == "yes" and USE_REVERSE_PROXY == "no" +%}
|
||||
etag on;
|
||||
{% else +%}
|
||||
etag off;
|
||||
{% endif +%}
|
||||
{% endif %}
|
||||
45
core/clientcache/plugin.json
Normal file
45
core/clientcache/plugin.json
Normal file
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"id": "clientcache",
|
||||
"order": 999,
|
||||
"name": "Client cache",
|
||||
"description": "Manage caching for clients.",
|
||||
"version": "0.1",
|
||||
"settings": {
|
||||
"USE_CLIENT_CACHE": {
|
||||
"context": "multisite",
|
||||
"default": "no",
|
||||
"help": "Tell client to store locally static files.",
|
||||
"id": "use-client-cache",
|
||||
"label": "Use client cache",
|
||||
"regex": "^(yes|no)$",
|
||||
"type": "check"
|
||||
},
|
||||
"CLIENT_CACHE_EXTENSIONS": {
|
||||
"context": "global",
|
||||
"default": "jpg|jpeg|png|bmp|ico|svg|tif|css|js|otf|ttf|eot|woff|woff2",
|
||||
"help": "List of file extensions that should be cached.",
|
||||
"id": "client-cache-extensions",
|
||||
"label": "Extensions that should be cached by the client",
|
||||
"regex": "^.*$",
|
||||
"type": "text"
|
||||
},
|
||||
"CLIENT_CACHE_ETAG": {
|
||||
"context": "multisite",
|
||||
"default": "yes",
|
||||
"help": "Send the HTTP ETag header for static resources.",
|
||||
"id": "client-cache-etag",
|
||||
"label": "ETag",
|
||||
"regex": "^(yes|no)$",
|
||||
"type": "check"
|
||||
},
|
||||
"CLIENT_CACHE_CONTROL": {
|
||||
"context": "multisite",
|
||||
"default": "public, max-age=15552000",
|
||||
"help": "Value of the Cache-Control HTTP header.",
|
||||
"id": "client-cache-control",
|
||||
"label": "Cache-Control header",
|
||||
"regex": "^.*$",
|
||||
"type": "text"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user