-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor Caddy configuration to add asset routing for woff2|tiff|md
- Loading branch information
1 parent
d8c2f2d
commit b88d17e
Showing
1 changed file
with
38 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,45 @@ | ||
{ | ||
"apps": | ||
{ | ||
"http": | ||
{ | ||
"servers": | ||
"apps": { | ||
"http": { | ||
"servers": { | ||
"web": { | ||
"automatic_https": { | ||
"disable": true | ||
}, | ||
"listen": [":8080"], | ||
"routes": [ | ||
{ | ||
"web": | ||
"handle": [ | ||
{ | ||
"automatic_https": | ||
{ | ||
"disable": true | ||
}, | ||
"listen": | ||
[ | ||
":8080" | ||
], | ||
"routes": | ||
[ | ||
{ | ||
"handle": | ||
[ | ||
{ | ||
"handler": "file_server", | ||
"root": "/srv" | ||
} | ||
], | ||
"match": | ||
[ | ||
{ | ||
"path_regexp": | ||
{ | ||
"name": "asset", | ||
"pattern": "\\.(br|css|gz|ico|jpg|js|mp3|mp4|png|svg)$" | ||
} | ||
} | ||
], | ||
"terminal": true | ||
}, | ||
{ | ||
"handle": | ||
[ | ||
{ | ||
"handler": "rewrite", | ||
"uri": "/index.html" | ||
}, | ||
{ | ||
"handler": "file_server", | ||
"root": "/srv" | ||
} | ||
] | ||
} | ||
] | ||
"handler": "file_server", | ||
"root": "/srv" | ||
} | ||
], | ||
"match": [ | ||
{ | ||
"path_regexp": { | ||
"name": "asset", | ||
"pattern": "\\.(br|css|gz|ico|jpg|js|mp3|mp4|png|svg|woff2|tiff|md)$" | ||
} | ||
} | ||
], | ||
"terminal": true | ||
}, | ||
{ | ||
"handle": [ | ||
{ | ||
"handler": "rewrite", | ||
"uri": "/index.html" | ||
}, | ||
{ | ||
"handler": "file_server", | ||
"root": "/srv" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |