add replace-response plugin for bento

This commit is contained in:
2026-06-06 12:17:31 +01:00
parent cc9b70417e
commit 5f2e7c31c8
2 changed files with 16 additions and 1 deletions
+14
View File
@@ -69,6 +69,20 @@ bento-pdf.64815139.xyz {
route {
reverse_proxy 192.168.0.210:9830
}
@html {
header Content-Type text/html*
}
replace_response @html </body> `<script>
document.addEventListener('DOMContentLoaded',function(){
['nav','#donation-ribbon','footer'].forEach(function(s){
var e=document.querySelector(s);if(e)e.remove();
});
var a=document.getElementById('app');
if(a)a.style.paddingTop='1rem';
});
</script></body>`
}
uptime.64815139.xyz {
+2 -1
View File
@@ -4,7 +4,8 @@ FROM caddy:${CADDY_VERSION}-builder-alpine AS builder
RUN xcaddy build \
--with github.com/mholt/caddy-l4 \
--with github.com/caddyserver/transform-encoder
--with github.com/caddyserver/transform-encoder \
--with github.com/caddyserver/replace-response
FROM caddy:${CADDY_VERSION} AS caddy