Redid the ansible playbook

This commit is contained in:
2026-05-05 10:04:35 +00:00
parent d14aba1202
commit 7aeb2a6055
13 changed files with 76 additions and 36 deletions

View File

@ -0,0 +1,24 @@
{{ host }} {
# Match and proxy API routes
@apiRoutes {
path_regexp ^/(api|token|refresh|attendance-report|fingerprint-report|db-image)
}
handle @apiRoutes {
reverse_proxy @apiRoutes {{ host_directory }}:80
}
# Match requests that end with .js, .css, .ico, or .html
@staticFiles {
path_regexp \.(js|css|ico|html)$
}
handle @staticFiles {
rewrite * /static{uri}
reverse_proxy {{ host_directory }}:80
}
# All other frontend routes → /static/index.html
handle {
rewrite * /static/index.html
reverse_proxy {{ host_directory }}:80
}
}