@@ -22,7 +22,6 @@ pub struct HtmlProcessorConfig {
2222 pub request_host : String ,
2323 pub request_scheme : String ,
2424 pub enable_prebid : bool ,
25- pub enable_permutive : bool ,
2625 pub integrations : IntegrationRegistry ,
2726 pub nextjs_enabled : bool ,
2827 pub nextjs_attributes : Vec < String > ,
@@ -49,7 +48,6 @@ impl HtmlProcessorConfig {
4948 request_host : request_host. to_string ( ) ,
5049 request_scheme : request_scheme. to_string ( ) ,
5150 enable_prebid : settings. prebid . auto_configure ,
52- enable_permutive : settings. permutive . auto_configure ,
5351 integrations : integrations. clone ( ) ,
5452 nextjs_enabled : settings. publisher . nextjs . enabled ,
5553 nextjs_attributes : settings. publisher . nextjs . rewrite_attributes . clone ( ) ,
@@ -146,14 +144,6 @@ pub fn create_html_processor(config: HtmlProcessorConfig) -> impl StreamProcesso
146144 )
147145 }
148146
149- fn is_permutive_sdk_url ( url : & str ) -> bool {
150- let lower = url. to_ascii_lowercase ( ) ;
151- // Match: https://*.edge.permutive.app/*-web.js
152- // Match: https://cdn.permutive.com/*-web.js
153- ( lower. contains ( ".edge.permutive.app" ) || lower. contains ( "cdn.permutive.com" ) )
154- && lower. ends_with ( "-web.js" )
155- }
156-
157147 let mut element_content_handlers = vec ! [
158148 element!( "head" , {
159149 let injected_tsjs = injected_tsjs. clone( ) ;
@@ -179,15 +169,12 @@ pub fn create_html_processor(config: HtmlProcessorConfig) -> impl StreamProcesso
179169 element!( "[href]" , {
180170 let patterns = patterns. clone( ) ;
181171 let rewrite_prebid = config. enable_prebid;
182- let rewrite_permutive = config. enable_permutive;
183172 let integrations = integration_registry. clone( ) ;
184173 move |el| {
185174 if let Some ( mut href) = el. get_attribute( "href" ) {
186175 let original_href = href. clone( ) ;
187176 if rewrite_prebid && is_prebid_script_url( & href) {
188177 href = tsjs:: ext_script_src( ) ;
189- } else if rewrite_permutive && is_permutive_sdk_url( & href) {
190- href = tsjs:: permutive_script_src( ) ;
191178 } else {
192179 let new_href = href
193180 . replace( & patterns. https_origin( ) , & patterns. replacement_url( ) )
@@ -220,15 +207,12 @@ pub fn create_html_processor(config: HtmlProcessorConfig) -> impl StreamProcesso
220207 element!( "[src]" , {
221208 let patterns = patterns. clone( ) ;
222209 let rewrite_prebid = config. enable_prebid;
223- let rewrite_permutive = config. enable_permutive;
224210 let integrations = integration_registry. clone( ) ;
225211 move |el| {
226212 if let Some ( mut src) = el. get_attribute( "src" ) {
227213 let original_src = src. clone( ) ;
228214 if rewrite_prebid && is_prebid_script_url( & src) {
229215 src = tsjs:: ext_script_src( ) ;
230- } else if rewrite_permutive && is_permutive_sdk_url( & src) {
231- src = tsjs:: permutive_script_src( ) ;
232216 } else {
233217 let new_src = src
234218 . replace( & patterns. https_origin( ) , & patterns. replacement_url( ) )
@@ -477,7 +461,6 @@ mod tests {
477461 request_host : "test.example.com" . to_string ( ) ,
478462 request_scheme : "https" . to_string ( ) ,
479463 enable_prebid : false ,
480- enable_permutive : false ,
481464 integrations : IntegrationRegistry :: default ( ) ,
482465 nextjs_enabled : false ,
483466 nextjs_attributes : vec ! [ "href" . to_string( ) , "link" . to_string( ) , "url" . to_string( ) ] ,
0 commit comments