caddyfile: Pass blocks to import for snippets (#6130)

* a

* a

* a

* a

* a

* a
This commit is contained in:
a
2024-06-14 12:27:51 -05:00
committed by GitHub
parent 8e0d3e1ec5
commit aca4002fd8
5 changed files with 337 additions and 2 deletions

View File

@ -0,0 +1,58 @@
(snippet) {
header {
{block}
}
}
example.com {
import snippet {
foo bar
}
}
----------
{
"apps": {
"http": {
"servers": {
"srv0": {
"listen": [
":443"
],
"routes": [
{
"match": [
{
"host": [
"example.com"
]
}
],
"handle": [
{
"handler": "subroute",
"routes": [
{
"handle": [
{
"handler": "headers",
"response": {
"set": {
"Foo": [
"bar"
]
}
}
}
]
}
]
}
],
"terminal": true
}
]
}
}
}
}
}