Files
ai-gateway/Caddyfile

32 lines
741 B
Caddyfile

{
debug
}
ai-gateway.ldex.dev {
log {
output stdout
}
# Stealth CORS: Reflect the requester's origin instead of using "*"
# This avoids the "*, *" duplication and looks less suspicious to Zscaler
header {
Access-Control-Allow-Origin "{header.Origin}"
Access-Control-Allow-Methods "GET, POST, OPTIONS"
Access-Control-Allow-Headers "*"
Access-Control-Expose-Headers "*"
Access-Control-Allow-Credentials "true"
# 'defer' ensures we override any headers sent by the backend
defer
}
# Handle preflights immediately
@options {
method OPTIONS
}
handle @options {
respond "" 204
}
reverse_proxy ai-gateway:8000
}