You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So since you use reverse_proxy with hdhomerun, would this be possible to cache incoming tuners you sent out via dowmstream to share the same data as cdn?
if so how would a caddy config file look like?
My config so far.
{
order request_id before header
order rate_limit before basicauth
}
(theheaders) {
header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
header X-Xss-Protection "1; mode=block"
header X-Content-Type-Options "nosniff"
header Cache-Control "no-store, no-cache, must-revalidate, max-age=0"
header Pragma "no-cache"
header X-Frame-Options "SAMEORIGIN"
header Permissions-Policy "accelerometer=(), ambient-light-sensor=(), autoplay=(self), camera=(), encrypted-media=(), fullscreen=(self), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), midi=(), payment=(), picture-in-picture=(*), speaker=(), sync-xhr=(), usb=(), vr=()"
header Access-Control-Allow-Credentials true {
defer
}
header /* {
-Server
}
}
domain {
import theheaders
encode gzip
log {
format single_field common_log # if getting erros this is removed later on from https://caddyserver.com/docs/caddyfile/directives/log > https://github.com/caddyserver/format-encoder
output file C:\stuff\caddy\logs\dvr_access.log {
roll true # Rotate logs, enabled by default
roll_size_mb 5 # Set max size 5 MB
roll_gzip true # Whether to compress rolled files
roll_local_time true # Use localhost time
roll_keep 2 # Keep at most 2 log files
roll_keep_days 7 # Keep log files for 7 days
}
}
rate_limit {
distributed
zone dynamic_example {
key {remote_host}
events 2
window 6s
}
}
rewrite * /a{path}
reverse_proxy ip:port ip:port ip:port ip:port {
# load balancing
lb_policy least_conn
lb_try_duration 500ms
lb_try_interval 250ms
# passive health checking
max_fails 2
transport http {
dial_timeout 3s
keepalive_idle_conns_per_host 4
#keepalive_idle_conns 4
#max_conns_per_host 2
}
}
basicauth {
user phash
}
}
The text was updated successfully, but these errors were encountered:
The cache plugin is specifically tasked with buffering the entire response and storing it in a cache to save from having to rebuilt the response for subsequent requests.
You're talking about streams, which can't be buffered. That is fundamentally incompatible with response caching, because there's no predictable "end" to the response, since it's a continuous stream.
What you're asking would require a lot of very specific code and handling on both the client and server to deal with. It's not really something that could be done "generally" since it requires understanding of the underlying data being streamed to be done right. The proxy would need to keep a list of streams in memory and somehow "connect" the request to one of the existing streams.
So yeah, you'll have to write your own Caddy plugin if you absolutely need this (or pay someone to do so), but I don't think you'll find a existing solution at this point because your requirement is very unique and specialized.
So since you use reverse_proxy with hdhomerun, would this be possible to cache incoming tuners you sent out via dowmstream to share the same data as cdn?
if so how would a caddy config file look like?
My config so far.
The text was updated successfully, but these errors were encountered: