We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dcbdf91 commit 726f8a4Copy full SHA for 726f8a4
1 file changed
src/Plugin/ProxifyPlugin.php
@@ -5,6 +5,7 @@
5
use Proxy\Plugin\AbstractPlugin;
6
use Proxy\Event\ProxyEvent;
7
use Proxy\Config;
8
+use Proxy\Html;
9
10
class ProxifyPlugin extends AbstractPlugin {
11
@@ -138,6 +139,19 @@ public function onCompleted(ProxyEvent $event){
138
139
return;
140
}
141
142
+ // remove JS from urls
143
+ $js_remove = Config::get('js_remove');
144
+ if(is_array($js_remove)){
145
+ $domain = parse_url($this->base_url, PHP_URL_HOST);
146
+
147
+ foreach($js_remove as $pattern){
148
+ if(strpos($domain, $pattern) !== false){
149
+ $str = Html::remove_scripts($str);
150
+ break;
151
+ }
152
153
154
155
// let's remove all frames?? does not protect against the frames created dynamically via javascript
156
$str = preg_replace('@<iframe[^>]*>[^<]*<\\/iframe>@is', '', $str);
157
0 commit comments