Skip to content

Commit b6b8695

Browse files
authored
Moved check for text/plain below "/ DO NOT do any proxification"
1 parent e0eefb4 commit b6b8695

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/Plugin/ProxifyPlugin.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,8 @@ public function onCompleted(ProxyEvent $event){
146146

147147
$str = $response->getContent();
148148

149-
// DO NOT do any proxification on .js files
150-
if($content_type == 'text/javascript' || $content_type == 'application/javascript' || $content_type == 'application/x-javascript'){
149+
// DO NOT do any proxification on .js files and text/plain content type
150+
if($content_type == 'text/javascript' || $content_type == 'application/javascript' || $content_type == 'application/x-javascript' || $content_type == 'text/plain'){
151151
return;
152152
}
153153

@@ -163,12 +163,6 @@ public function onCompleted(ProxyEvent $event){
163163
}
164164
}
165165

166-
// Return plain text content without replacing URLs
167-
if(stripos($content_type, "text/plain") === 0){
168-
$response->setContent($str);
169-
return;
170-
}
171-
172166
// add html.no-js
173167

174168
// let's remove all frames?? does not protect against the frames created dynamically via javascript

0 commit comments

Comments
 (0)