71 lines
2.4 KiB
Plaintext
71 lines
2.4 KiB
Plaintext
http_port 3128 accel vhost vport defaultsite=${backend_host}
|
|
cache_peer ${backend_host} parent ${backend_port} 0 no-query originserver name=myBackend
|
|
|
|
acl docker_network src 172.16.0.0/12
|
|
acl localhost src 127.0.0.1/32
|
|
acl to_homelab dst ${backend_host}
|
|
|
|
http_access allow docker_network
|
|
http_access allow localhost
|
|
http_access allow to_homelab
|
|
http_access deny all
|
|
|
|
cache_peer_access myBackend allow all
|
|
|
|
cache_mem 256 MB
|
|
maximum_object_size_in_memory 512 KB
|
|
maximum_object_size 50 MB
|
|
minimum_object_size 0 KB
|
|
cache_dir ufs /var/spool/squid 2000 16 256
|
|
|
|
refresh_pattern -i \.html?$ 60 20% 3600
|
|
refresh_pattern -i \.(css|js)$ 1440 10% 10080
|
|
refresh_pattern -i \.(jpg|jpeg|png|gif|ico|webp|svg)$ 10080 5% 43200
|
|
refresh_pattern -i \.(woff|woff2|ttf|eot)$ 43200 1% 31536000
|
|
refresh_pattern -i \.php$ 5 50% 30
|
|
refresh_pattern -i /api/ 5 50% 30
|
|
refresh_pattern . 1440 20% 4320
|
|
|
|
access_log /var/log/squid/access.log squid
|
|
cache_log /var/log/squid/cache.log
|
|
cache_store_log /var/log/squid/store.log
|
|
|
|
request_header_access Allow allow all
|
|
request_header_access Authorization allow all
|
|
request_header_access WWW-Authenticate allow all
|
|
request_header_access Proxy-Authorization allow all
|
|
request_header_access Proxy-Authenticate allow all
|
|
request_header_access Cache-Control allow all
|
|
request_header_access Content-Encoding allow all
|
|
request_header_access Content-Length allow all
|
|
request_header_access Content-Type allow all
|
|
request_header_access Date allow all
|
|
request_header_access Expires allow all
|
|
request_header_access Host allow all
|
|
request_header_access If-Modified-Since allow all
|
|
request_header_access Last-Modified allow all
|
|
request_header_access Location allow all
|
|
request_header_access Pragma allow all
|
|
request_header_access Accept allow all
|
|
request_header_access Accept-Charset allow all
|
|
request_header_access Accept-Encoding allow all
|
|
request_header_access Accept-Language allow all
|
|
request_header_access Content-Language allow all
|
|
request_header_access Mime-Version allow all
|
|
request_header_access Retry-After allow all
|
|
request_header_access Title allow all
|
|
request_header_access Connection allow all
|
|
request_header_access Proxy-Connection allow all
|
|
request_header_access User-Agent allow all
|
|
request_header_access Cookie allow all
|
|
|
|
coredump_dir /var/spool/squid
|
|
|
|
forwarded_for off
|
|
via off
|
|
|
|
negative_ttl 5 minutes
|
|
positive_dns_ttl 6 hours
|
|
read_timeout 15 minutes
|
|
client_db off
|