check for api
This commit is contained in:
parent
aecccbb023
commit
409d6b6ce2
|
|
@ -17,35 +17,29 @@ bayarea-cc.com, www.bayarea-cc.com {
|
|||
dns cloudflare q1P7J3uqS96FGj_iiX2mI8y1ulTaIFrTp8tyTXhG
|
||||
}
|
||||
|
||||
# Statische Dateien aus dem Angular Build-Verzeichnis
|
||||
# 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
|
||||
# Reverse Proxy für API-Anfragen (hat Vorrang)
|
||||
@api {
|
||||
path /api/*
|
||||
}
|
||||
reverse_proxy @api localhost:3001 {
|
||||
# Optional: Header für Debugging
|
||||
reverse_proxy @api host.docker.internal:3001 {
|
||||
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 (optional)
|
||||
# Logging für Debugging
|
||||
log {
|
||||
output file /var/log/caddy/bayarea-cc.log
|
||||
output stderr
|
||||
format console
|
||||
}
|
||||
|
||||
# Komprimierung für bessere Performance
|
||||
encode gzip
|
||||
}
|
||||
auth.bizmatch.net {
|
||||
|
|
|
|||
Loading…
Reference in New Issue