add replace-response plugin for bento
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user