-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsettings.yaml
executable file
·97 lines (94 loc) · 3.65 KB
/
settings.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
fields:
cache_disabled_authenticated:
display: Disable static caching for authenticated users
type: toggle
instructions: Check to disable static caching for authenticated users. You may also disable for specific user roles or groups only.
cache_disabled_user_roles:
display: User roles
type: list
instructions: Enter role slugs to disable the cache only for users having a role defined here.
width: 33
show_when:
cache_disabled_authenticated: true
cache_disabled_user_groups:
display: User groups
type: list
instructions: Enter group slugs to disable the cache only for users belonging to a group defined here.
width: 33
show_when:
cache_disabled_authenticated: true
cache_disabled_cookie_name:
display: Cookie name
type: text
instructions: Cookie used to skip the static file cache from the reverse proxy.
width: 33
show_when:
cache_disabled_authenticated: true
whitelisted_query_strings:
display: Whitelisted query strings
type: yaml
instructions: |
Restrict the static cache to only cache whitelisted query strings per path. The value of each query string is
validated against a regex pattern.
**Examples:**
```
/products:
page: '[0-9]+'
/categories*:
sort: '^(desc|asc)$'
```
1. Cache the `page` query string on the `/products` page, but only if it contains at least one number
2. Cache the `sort` query string of any page under `/categories`, but only if it contains `desc` or `asc`
cache_domain_enabled:
type: toggle
display: Create separate cache for each domain
instructions: |
Enable if the markup of pages is different per domain.
Note: If you are using the full mesasure strategy, make sure to adjust the rewrite rules in the reverse proxy according to the docs.
section_warmup:
type: section
instructions: |
These settings apply when warming up the static cache via the `super_static_cache:warmup` command.
display: Warmup
warmup_collections:
display: Collections
type: list
instructions: The static cache is only generated for the collections specified here. Enter collection names.
warmup_taxonomies:
display: Taxonomies
type: list
instructions: The static cache is only generated for taxonomies specified here. Enter taxonomy names.
warmup_request_timeout:
display: Request timeout
type: text
instructions: 'Timeout of the requests in seconds. Use `0` to wait indefinitely.'
section_debug:
type: section
display: Debugging
debug_enabled:
type: toggle
display: Enable debugging
debug_string:
type: text
display: Debug string
instructions: 'This string gets prepended to the source code of cached responses, allowing you to easily identify pages served by the static cache.'
show_when:
debug_enabled: true
section_dynamic_csrf:
type: section
display: Dynamic CSRF tokens
instructions: |
If enabled, the module offers an API to fetch CSRF tokens. This allows to use the static cache in combination with forms.
Use the `{{ super_static_cache:populate_csrf_tokens }}` tag to inject the CSRF token in each form's `_token` field via ajax.
dynamic_csrf_enabled:
type: toggle
display: Enable dynamic CSRF tokens
dynamic_csrf_referer_base_url:
type: text
display: HTTP referer base url
instructions: |
Enhance security by checking if the HTTP referer header of API requests starts with the base url configured here. This is
typically your website's URL.
**Note: This header can be faked by the client**
show_when:
dynamic_csrf_enabled: true