Redirecting to Controller when main react app is down.

This commit is contained in:
Roland 2026-03-07 19:17:38 -07:00
parent 08982647ac
commit 8261df5bef
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680
3 changed files with 34 additions and 31 deletions

View file

@ -88,22 +88,11 @@
# React app with fallback to Controller.
handle {
reverse_proxy 0.0.0.0:3000 {
@bad status 502 503 504
handle_response @bad {
header Location /controller/?fallback=true
respond "" 302
}
}
reverse_proxy 0.0.0.0:3000
}
handle_errors {
header Access-Control-Allow-Origin "*"
header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
header Access-Control-Allow-Headers "Content-Type, Accept"
root * /var/www
rewrite * /50x.html
file_server
handle_errors 502 503 504 {
redir * "http://{host}:8087/?fallback=true" 302
}
}