Athlon1600 / php-proxy

A web proxy script written in PHP and built as an alternative to Glype.
https://www.php-proxy.com
MIT License
296 stars 158 forks source link

Return "text/plain" content without replacing URLs #59

Closed webaddicto closed 7 years ago

webaddicto commented 7 years ago
        // Return plain text content without replacing URLs
        if(stripos($content_type, "text/plain") === 0){
            $response->setContent($str);
            return;
        }

Try to proxify this URL on unblockvideos.com: https://raw.githubusercontent.com/Athlon1600/php-proxy-plugin-bundle/master/src/utils.php

Without this commit the proxy proxify all URLs.

webaddicto commented 7 years ago

@Athlon1600

What do you think about this commit?

Athlon1600 commented 7 years ago

There is already a block of logic right after:
// DO NOT do any proxification on .js files

that checks to see if current file is worth proxifying. That is where you should check for your content-type and if proxifying is not needed, just jump out of that method with a

return;
webaddicto commented 7 years ago

I made the update, let me know if it is fine for you.

Athlon1600 commented 7 years ago

Yup this is good now.