Browse Source
* httpcaddyfile: Flip `root` directive sort order * httpcaddyfile: Sort directives with any matcher before those with none * httpcaddyfile: Generalize reverse sort directives, improve logic * httpcaddyfile: Fix "spelling" issue * httpcaddyfile: Turns out the second change precludes the first httpcaddyfile: Delete test that no longer makes sense * httpcaddyfile: Shorten logic Co-authored-by: Matt Holt <mholt@users.noreply.github.com> Co-authored-by: Matt Holt <mholt@users.noreply.github.com>master
committed by
GitHub
2 changed files with 63 additions and 0 deletions
@ -0,0 +1,55 @@ |
|||
:80 |
|||
|
|||
file_server |
|||
|
|||
@untrusted not remote_ip 10.1.1.0/24 |
|||
file_server @untrusted |
|||
---------- |
|||
{ |
|||
"apps": { |
|||
"http": { |
|||
"servers": { |
|||
"srv0": { |
|||
"listen": [ |
|||
":80" |
|||
], |
|||
"routes": [ |
|||
{ |
|||
"match": [ |
|||
{ |
|||
"not": [ |
|||
{ |
|||
"remote_ip": { |
|||
"ranges": [ |
|||
"10.1.1.0/24" |
|||
] |
|||
} |
|||
} |
|||
] |
|||
} |
|||
], |
|||
"handle": [ |
|||
{ |
|||
"handler": "file_server", |
|||
"hide": [ |
|||
"Caddyfile" |
|||
] |
|||
} |
|||
] |
|||
}, |
|||
{ |
|||
"handle": [ |
|||
{ |
|||
"handler": "file_server", |
|||
"hide": [ |
|||
"Caddyfile" |
|||
] |
|||
} |
|||
] |
|||
} |
|||
] |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
Loading…
Reference in new issue