From fc0e1c3c6ecfe3fa9a95603f712fb1a427b2ba74 Mon Sep 17 00:00:00 2001 From: Viktor Barzin Date: Sat, 21 Feb 2026 21:32:39 +0000 Subject: [PATCH] [ci skip] Fix narrow iframe content and strip anti-debug scripts in proxy - Remove flex centering from browser-viewer-content; use absolute positioning for iframe to fill the entire container - Strip disable-devtool and devtools-detect script tags from proxied HTML - Add JS shim hooks to neutralize setInterval-based debugger traps and block loading of anti-debug scripts via setAttribute - Bump image to v1.2.5 --- .../f1-stream/files/internal/proxy/proxy.go | 21 ++++++++++++++++++- .../f1-stream/files/static/css/custom.css | 7 +++---- modules/kubernetes/f1-stream/main.tf | 2 +- 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/modules/kubernetes/f1-stream/files/internal/proxy/proxy.go b/modules/kubernetes/f1-stream/files/internal/proxy/proxy.go index d631b22f..8e20fcd1 100644 --- a/modules/kubernetes/f1-stream/files/internal/proxy/proxy.go +++ b/modules/kubernetes/f1-stream/files/internal/proxy/proxy.go @@ -91,6 +91,19 @@ if(_ss&&_ss.set){Object.defineProperty(el,'src',{get:function(){return _ss.get?_ } return el; }; +/* Neutralize anti-debug: override setInterval to skip debugger-based detection */ +var _si=window.setInterval; +window.setInterval=function(fn,ms){ +if(typeof fn==='function'){var s=fn.toString();if(s.indexOf('debugger')!==-1||s.indexOf('devtool')!==-1)return 0;} +if(typeof fn==='string'&&(fn.indexOf('debugger')!==-1||fn.indexOf('devtool')!==-1))return 0; +return _si.apply(this,arguments); +}; +/* Block loading of known anti-debug scripts */ +var _ael=HTMLScriptElement.prototype.setAttribute; +HTMLScriptElement.prototype.setAttribute=function(n,v){ +if(n==='src'&&typeof v==='string'&&(v.indexOf('disable-devtool')!==-1||v.indexOf('devtools-detect')!==-1)){return;} +return _ael.apply(this,arguments); +}; })();` // NewHandler returns an http.Handler that serves the reverse proxy at /proxy/. @@ -282,6 +295,9 @@ var rootRelativeCSSRe = regexp.MustCompile(`(url\(\s*["']?)/([^/"')[^"')]*)(["'] // crossOriginIframeSrcRe matches