check for api

This commit is contained in:
Andreas Knuth 2025-02-21 13:15:07 -06:00
parent aecccbb023
commit 409d6b6ce2
1 changed files with 12 additions and 18 deletions

View File

@ -17,35 +17,29 @@ bayarea-cc.com, www.bayarea-cc.com {
dns cloudflare q1P7J3uqS96FGj_iiX2mI8y1ulTaIFrTp8tyTXhG dns cloudflare q1P7J3uqS96FGj_iiX2mI8y1ulTaIFrTp8tyTXhG
} }
# Statische Dateien aus dem Angular Build-Verzeichnis # Reverse Proxy für API-Anfragen (hat Vorrang)
# root * /app
# file_server
# Fallback für Angular SPA Routing
# try_files {path} /index.html
handle {
root * /app
try_files {path} {path}/ /index.html
file_server
}
# Reverse Proxy für API-Anfragen an Nest.js
@api { @api {
path /api/* path /api/*
} }
reverse_proxy @api localhost:3001 { reverse_proxy @api host.docker.internal:3001 {
# Optional: Header für Debugging
header_up X-Real-IP {remote_host} header_up X-Real-IP {remote_host}
} }
# Statische Dateien nur für nicht-API-Pfade
@notApi {
not path /api/*
}
root * /app
file_server @notApi {
try_files {path} /index.html
}
# Logging für Debugging
# Logging (optional)
log { log {
output file /var/log/caddy/bayarea-cc.log output stderr
format console format console
} }
# Komprimierung für bessere Performance
encode gzip encode gzip
} }
auth.bizmatch.net { auth.bizmatch.net {