mirror of
https://github.com/caddyserver/website.git
synced 2025-04-24 22:16:15 -04:00
docs: first_exist_fallback try policy
This commit is contained in:
parent
dbd9cc7948
commit
61e6f86072
2 changed files with 5 additions and 3 deletions
|
@ -300,7 +300,7 @@ respond @api "Hello, API!"
|
|||
file {
|
||||
root <path>
|
||||
try_files <files...>
|
||||
try_policy first_exist|smallest_size|largest_size|most_recently_modified
|
||||
try_policy first_exist|first_exist_fallback|smallest_size|largest_size|most_recently_modified
|
||||
split_path <delims...>
|
||||
}
|
||||
file <files...>
|
||||
|
@ -308,7 +308,7 @@ file <files...>
|
|||
expression `file({
|
||||
'root': '<path>',
|
||||
'try_files': ['<files...>'],
|
||||
'try_policy': 'first_exist|smallest_size|largest_size|most_recently_modified',
|
||||
'try_policy': 'first_exist|first_exist_fallback|smallest_size|largest_size|most_recently_modified',
|
||||
'split_path': ['<delims...>']
|
||||
})`
|
||||
expression file('<files...>')
|
||||
|
@ -330,6 +330,8 @@ By files.
|
|||
|
||||
- `first_exist` checks for file existence. The first file that exists is selected.
|
||||
|
||||
- `first_exist_fallback` is similar to `first_exist`, but assumes that the last element in the list always exists to prevent a disk access.
|
||||
|
||||
- `smallest_size` chooses the file with the smallest size.
|
||||
|
||||
- `largest_size` chooses the file with the largest size.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue