package
module
Version:
v0.1.0
Opens a new window with list of versions in this module.
Published: Aug 14, 2023
License: Apache-2.0, MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
🍭 caddyfile-ext
Extends your Caddyfile with additional JSON configuration.
✍️ Example
{
app1 example {
# set value of a field
# > "field": "whatever"
field whatever
# value is first converted to a scalar type
# > "boolean": true
# > "number": 123.45
boolean true
number 123.45
# quoted value is always a string
# > "string": "false"
stirng "false"
# multiple arguments are considered as a path to update a value
# > "a": {
# > "b": {
# > "c": {
# > "k1": "v1",
# > "k2": "v2"
# > }
# > }
# > }
a b c {
k1 v2
k2 v1
}
# key starts with '+' represents an array
# > "arr": [1, 2]
+arr 1
+arr 2
# '+' is available in a path to create a single-element array
# > "obj": {
# > "arr": [{
# > "key": "val"
# > }]
# > }
obj +arr key val
}
# create a layer4 App
app2 layer4 servers main {
+listen :7443
+routes {
+match tls +sni xx.example.com
+handle {
handler proxy
+upstreams +dial :7441
}
}
+routes {
+match tls +sni yy.example.com
+handle {
handler proxy
+upstreams +dial :7442
}
}
+routes {
+handle {
handler proxy
+upstreams +dial :7443
}
}
}
}
⚖️ License
Licensed under either of
at your option.
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.