mirror of
https://github.com/caddyserver/caddy.git
synced 2025-01-06 22:40:31 -05:00
77 lines
No EOL
1 KiB
Text
77 lines
No EOL
1 KiB
Text
:80 {
|
|
@matcher {
|
|
method GET
|
|
}
|
|
respond @matcher "get"
|
|
|
|
@matcher2 method POST
|
|
respond @matcher2 "post"
|
|
|
|
@matcher3 not method PUT
|
|
respond @matcher3 "not put"
|
|
}
|
|
----------
|
|
{
|
|
"apps": {
|
|
"http": {
|
|
"servers": {
|
|
"srv0": {
|
|
"listen": [
|
|
":80"
|
|
],
|
|
"routes": [
|
|
{
|
|
"match": [
|
|
{
|
|
"method": [
|
|
"GET"
|
|
]
|
|
}
|
|
],
|
|
"handle": [
|
|
{
|
|
"body": "get",
|
|
"handler": "static_response"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"match": [
|
|
{
|
|
"method": [
|
|
"POST"
|
|
]
|
|
}
|
|
],
|
|
"handle": [
|
|
{
|
|
"body": "post",
|
|
"handler": "static_response"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"match": [
|
|
{
|
|
"not": [
|
|
{
|
|
"method": [
|
|
"PUT"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"handle": [
|
|
{
|
|
"body": "not put",
|
|
"handler": "static_response"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |