iPXE Server
This commit is contained in:
51
ipxe.snippet
Normal file
51
ipxe.snippet
Normal file
@@ -0,0 +1,51 @@
|
||||
# snippets/ipxe
|
||||
# iPXE Boot Server reverse proxy configuration
|
||||
# Import in Caddyfile with: import snippets/ipxe
|
||||
|
||||
(ipxe-headers) {
|
||||
header {
|
||||
# Disable caching for menus (dynamic content)
|
||||
Cache-Control "no-cache, no-store, must-revalidate"
|
||||
Pragma "no-cache"
|
||||
-Server
|
||||
}
|
||||
}
|
||||
|
||||
(ipxe-boot-headers) {
|
||||
header {
|
||||
# Cache boot files aggressively (kernels, initramfs rarely change)
|
||||
Cache-Control "public, max-age=86400"
|
||||
-Server
|
||||
}
|
||||
}
|
||||
|
||||
(ipxe-image-headers) {
|
||||
header {
|
||||
# Moderate caching for images
|
||||
Cache-Control "public, max-age=3600"
|
||||
# Support range requests for large files
|
||||
Accept-Ranges "bytes"
|
||||
-Server
|
||||
}
|
||||
}
|
||||
|
||||
(ipxe-upstream) {
|
||||
# Reverse proxy to iPXE container
|
||||
reverse_proxy ipxe-server:8080 {
|
||||
# Timeouts for large file transfers
|
||||
transport http {
|
||||
response_header_timeout 30s
|
||||
read_timeout 300s
|
||||
write_timeout 300s
|
||||
}
|
||||
|
||||
# Health check
|
||||
health_uri /health
|
||||
health_interval 30s
|
||||
health_timeout 5s
|
||||
|
||||
# Fail fast if unhealthy
|
||||
fail_duration 30s
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user