Skip to content

Instantly share code, notes, and snippets.

@EmmanuelOga
Last active November 30, 2020 12:33
Show Gist options
  • Save EmmanuelOga/c12381f0811429885649309d271de276 to your computer and use it in GitHub Desktop.
Save EmmanuelOga/c12381f0811429885649309d271de276 to your computer and use it in GitHub Desktop.
Caddy verbose and short configurations
GET http://localhost:2019/config/
HTTP/1.1 200 OK
Content-Type: application/json
Date: Mon, 30 Nov 2020 11:58:35 GMT
Content-Length: 389
Connection: close
{
"apps": {
"http": {
"servers": {
"srv0": {
"listen": [
":443"
],
"routes": [
{
"handle": [
{
"handler": "subroute",
"routes": [
{
"handle": [
{
"handler": "vars",
"root": "./static"
}
]
},
{
"handle": [
{
"handler": "reverse_proxy",
"upstreams": [
{
"dial": "127.0.0.1:3000"
}
]
}
],
"match": [
{
"not": [
{
"file": {}
}
]
}
]
},
{
"handle": [
{
"handler": "file_server",
"hide": [
"Caddyfile"
]
}
]
}
]
}
],
"match": [
{
"host": [
"localhost"
]
}
],
"terminal": true
}
]
}
}
}
}
}
GET http://localhost:2019/config/
HTTP/1.1 200 OK
Content-Type: application/json
Date: Mon, 30 Nov 2020 12:26:47 GMT
Content-Length: 440
Connection: close
{
"apps": {
"http": {
"servers": {
"srv0": {
"listen": [
":443"
],
"routes": [
{
"handle": [
{
"handler": "subroute",
"routes": [
{
"handle": [
{
"handler": "vars",
"root": "./static"
}
]
},
{
"handle": [
{
"handler": "reverse_proxy",
"upstreams": [
{
"dial": "127.0.0.1:3000"
}
]
}
],
"match": [
{
"not": [
{
"file": {
"try_files": [
"try_files",
"{http.request.uri.path}"
]
}
}
]
}
]
},
{
"handle": [
{
"handler": "file_server",
"hide": [
"Caddyfile"
]
}
]
}
]
}
],
"match": [
{
"host": [
"localhost"
]
}
],
"terminal": true
}
]
}
}
}
}
}
GET http://localhost:2019/config/
HTTP/1.1 200 OK
Content-Type: application/json
Date: Mon, 30 Nov 2020 11:56:51 GMT
Content-Length: 428
Connection: close
{
"apps": {
"http": {
"servers": {
"srv0": {
"listen": [
":443"
],
"routes": [
{
"handle": [
{
"handler": "subroute",
"routes": [
{
"handle": [
{
"handler": "vars",
"root": "./static"
}
]
},
{
"handle": [
{
"handler": "reverse_proxy",
"upstreams": [
{
"dial": "127.0.0.1:3000"
}
]
}
],
"match": [
{
"not": [
{
"file": {
"try_files": [
"{http.request.uri.path}"
]
}
}
]
}
]
},
{
"handle": [
{
"handler": "file_server",
"hide": [
"Caddyfile"
]
}
]
}
]
}
],
"match": [
{
"host": [
"localhost"
]
}
],
"terminal": true
}
]
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment