Skip to content

Commit e0eefb4

Browse files
authored
Return "text/plain" content without replacing URLs
1 parent de75904 commit e0eefb4

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Plugin/ProxifyPlugin.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,12 @@ 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+
166172
// add html.no-js
167173

168174
// let's remove all frames?? does not protect against the frames created dynamically via javascript
@@ -182,4 +188,4 @@ public function onCompleted(ProxyEvent $event){
182188

183189
}
184190

185-
?>
191+
?>

0 commit comments

Comments
 (0)