mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-06 08:58:09 +02:00
Create Caddyfile
This commit is contained in:
67
mealie/rootfs/app/Caddyfile
Normal file
67
mealie/rootfs/app/Caddyfile
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
{
|
||||||
|
auto_https off
|
||||||
|
admin off
|
||||||
|
}
|
||||||
|
|
||||||
|
:8099 {
|
||||||
|
@proxied path /api/* /docs /openapi.json
|
||||||
|
|
||||||
|
@static {
|
||||||
|
file
|
||||||
|
path *.ico *.css *.js *.gif *.jpg *.jpeg *.png *.svg *.woff *.woff2 *.webp
|
||||||
|
}
|
||||||
|
|
||||||
|
encode gzip zstd
|
||||||
|
|
||||||
|
# Handles Recipe Images / Assets
|
||||||
|
handle_path /api/media/recipes/* {
|
||||||
|
header @static Cache-Control max-age=31536000
|
||||||
|
header X-Frame-Options "SAMEORIGIN"
|
||||||
|
root * /app/data/recipes/
|
||||||
|
file_server
|
||||||
|
}
|
||||||
|
|
||||||
|
handle @proxied {
|
||||||
|
uri strip_suffix /
|
||||||
|
header X-Frame-Options "SAMEORIGIN"
|
||||||
|
reverse_proxy http://127.0.0.1:9000
|
||||||
|
}
|
||||||
|
|
||||||
|
handle {
|
||||||
|
header @static Cache-Control max-age=31536000
|
||||||
|
root * /app/dist
|
||||||
|
header X-Frame-Options "SAMEORIGIN"
|
||||||
|
try_files {path}.html {path} /
|
||||||
|
file_server
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
:80 {
|
||||||
|
@proxied path /api/* /docs /openapi.json
|
||||||
|
|
||||||
|
@static {
|
||||||
|
file
|
||||||
|
path *.ico *.css *.js *.gif *.jpg *.jpeg *.png *.svg *.woff *.woff2 *.webp
|
||||||
|
}
|
||||||
|
|
||||||
|
encode gzip zstd
|
||||||
|
|
||||||
|
# Handles Recipe Images / Assets
|
||||||
|
handle_path /api/media/recipes/* {
|
||||||
|
header @static Cache-Control max-age=31536000
|
||||||
|
root * /app/data/recipes/
|
||||||
|
file_server
|
||||||
|
}
|
||||||
|
|
||||||
|
handle @proxied {
|
||||||
|
uri strip_suffix /
|
||||||
|
reverse_proxy http://127.0.0.1:9000
|
||||||
|
}
|
||||||
|
|
||||||
|
handle {
|
||||||
|
header @static Cache-Control max-age=31536000
|
||||||
|
root * /app/dist
|
||||||
|
try_files {path}.html {path} /
|
||||||
|
file_server
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user