2022-12-20 10:22:36 +03:00
|
|
|
:80 {
|
|
|
|
root /* ./dist
|
|
|
|
|
|
|
|
file_server {
|
|
|
|
# precompressed br
|
|
|
|
}
|
|
|
|
|
|
|
|
encode {
|
|
|
|
zstd
|
|
|
|
gzip 9
|
|
|
|
}
|
|
|
|
|
|
|
|
header {
|
|
|
|
# 7 days
|
|
|
|
Cache-Control "public, max-age=86400, must-revalidate"
|
|
|
|
}
|
|
|
|
|
2022-12-30 16:40:15 +03:00
|
|
|
handle /api/* {
|
2022-12-20 10:22:36 +03:00
|
|
|
reverse_proxy {$API_SERVER} {
|
2022-12-30 16:40:15 +03:00
|
|
|
health_uri /api/healthz
|
2022-12-20 10:22:36 +03:00
|
|
|
@error status 500 502 503 503
|
|
|
|
handle_response @error {
|
|
|
|
root * /dist
|
|
|
|
rewrite * /50x.html
|
|
|
|
file_server
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@notStatic {
|
|
|
|
not path /_next/static/*
|
|
|
|
}
|
|
|
|
|
|
|
|
handle @notStatic {
|
|
|
|
header {
|
|
|
|
Cache-Control "no-cache, no-store, must-revalidate"
|
|
|
|
}
|
|
|
|
try_files {path} /index.html
|
|
|
|
}
|
|
|
|
}
|