File tree Expand file tree Collapse file tree 2 files changed +24
-4
lines changed
Expand file tree Collapse file tree 2 files changed +24
-4
lines changed Original file line number Diff line number Diff line change @@ -576,10 +576,20 @@ if (binaryInfo != null && binaryInfo.length > 0) {
576576 }
577577 if ( value ) {
578578 value = value . replace ( / \s + \/ \/ / g, '//' )
579- rwbodyBox . push ( { type : `http-${ type } -jq` , regex, value } )
579+ rwbodyBox . push ( {
580+ type : `http-${ type } -jq` ,
581+ regex,
582+ value : value . startsWith ( "'" ) && value . endsWith ( "'" ) ? value : `'${ value } '` ,
583+ } )
580584 }
581585 } else if ( isLooniOS ) {
582- ; / b o d y - j s o n - j q / . test ( _x ) ? URLRewrite . push ( _x ) : URLRewrite . push ( `${ regex } ${ type } -body-json-jq ${ value } ` )
586+ if ( / b o d y - j s o n - j q / . test ( _x ) ) {
587+ URLRewrite . push ( _x )
588+ } else {
589+ URLRewrite . push (
590+ `${ regex } ${ type } -body-json-jq ${ value . startsWith ( "'" ) && value . endsWith ( "'" ) ? value : `'${ value } '` } `
591+ )
592+ }
583593 }
584594 }
585595
Original file line number Diff line number Diff line change @@ -576,10 +576,20 @@ if (binaryInfo != null && binaryInfo.length > 0) {
576576 }
577577 if ( value ) {
578578 value = value . replace ( / \s + \/ \/ / g, '//' )
579- rwbodyBox . push ( { type : `http-${ type } -jq` , regex, value } )
579+ rwbodyBox . push ( {
580+ type : `http-${ type } -jq` ,
581+ regex,
582+ value : value . startsWith ( "'" ) && value . endsWith ( "'" ) ? value : `'${ value } '` ,
583+ } )
580584 }
581585 } else if ( isLooniOS ) {
582- ; / b o d y - j s o n - j q / . test ( _x ) ? URLRewrite . push ( _x ) : URLRewrite . push ( `${ regex } ${ type } -body-json-jq ${ value } ` )
586+ if ( / b o d y - j s o n - j q / . test ( _x ) ) {
587+ URLRewrite . push ( _x )
588+ } else {
589+ URLRewrite . push (
590+ `${ regex } ${ type } -body-json-jq ${ value . startsWith ( "'" ) && value . endsWith ( "'" ) ? value : `'${ value } '` } `
591+ )
592+ }
583593 }
584594 }
585595
You can’t perform that action at this time.
0 commit comments