Skip to content

Commit

Permalink
Refactor Caddy configuration to add asset routing for woff2|tiff|md
Browse files Browse the repository at this point in the history
  • Loading branch information
devincowan committed Nov 5, 2024
1 parent d8c2f2d commit b88d17e
Showing 1 changed file with 38 additions and 51 deletions.
89 changes: 38 additions & 51 deletions app/frontend/caddy.docker.json
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"
}
]
}
]
}
}
}
}
}
}

0 comments on commit b88d17e

Please sign in to comment.