хозяйственная работа: временно позволите доступ, загружаются чайница
This commit is contained in:
parent
da1b6c270a
commit
ca39330df5
2 changed files with 47 additions and 36 deletions
|
|
@ -1,50 +1,60 @@
|
|||
{
|
||||
cache
|
||||
log {
|
||||
format console
|
||||
level WARN
|
||||
}
|
||||
cache
|
||||
|
||||
log {
|
||||
level INFO
|
||||
format transform `{request>client_ip} - {user_id} [{ts}] "{request>method} {request>uri} {request>proto}" {status} {size} "{request>headers>Referer>[0]}" "{request>headers>User-Agent>[0]}"` {
|
||||
time_format "02/Jan/2006: 15:04:05 -0700"
|
||||
}
|
||||
}
|
||||
|
||||
servers :80 {
|
||||
trusted_proxies static private_ranges
|
||||
client_ip_headers X-Forwarded-For X-Real-IP
|
||||
}
|
||||
}
|
||||
|
||||
http://ядро.орг, http://*.ядро.орг {
|
||||
tls internal
|
||||
encode gzip zstd
|
||||
tls internal
|
||||
encode gzip zstd
|
||||
|
||||
cache {
|
||||
# we don't want to flood the upstream from the same IP
|
||||
mode bypass
|
||||
ttl 30m
|
||||
log
|
||||
|
||||
timeout {
|
||||
backend 10m
|
||||
}
|
||||
}
|
||||
cache {
|
||||
# we don't want to flood the upstream from the same IP
|
||||
mode bypass
|
||||
ttl 30m
|
||||
|
||||
import Caddyfile.yadro proxy:80
|
||||
timeout {
|
||||
backend 10m
|
||||
}
|
||||
}
|
||||
|
||||
import Caddyfile.yadro proxy:80
|
||||
}
|
||||
|
||||
:9000 {
|
||||
reverse_proxy {
|
||||
dynamic a puppy 80
|
||||
lb_policy least_conn
|
||||
reverse_proxy {
|
||||
dynamic a puppy 80
|
||||
lb_policy least_conn
|
||||
|
||||
transport http {
|
||||
response_header_timeout 10m
|
||||
read_timeout 10m
|
||||
write_timeout 10m
|
||||
}
|
||||
}
|
||||
transport http {
|
||||
response_header_timeout 10m
|
||||
read_timeout 10m
|
||||
write_timeout 10m
|
||||
}
|
||||
}
|
||||
|
||||
cache {
|
||||
allowed_http_verbs POST
|
||||
ttl 7d
|
||||
cache {
|
||||
allowed_http_verbs POST
|
||||
ttl 7d
|
||||
|
||||
key {
|
||||
headers X-Translation-Direction
|
||||
}
|
||||
key {
|
||||
headers X-Translation-Direction
|
||||
}
|
||||
|
||||
timeout {
|
||||
backend 10m
|
||||
}
|
||||
}
|
||||
timeout {
|
||||
backend 10m
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
FROM caddy:builder AS builder
|
||||
RUN --mount=type=cache,target=/go/pkg/mod xcaddy build \
|
||||
--with github.com/caddyserver/cache-handler
|
||||
--with github.com/caddyserver/cache-handler \
|
||||
--with github.com/caddyserver/transform-encoder
|
||||
|
||||
FROM caddy:latest
|
||||
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue