softius / php-cross-domain-proxy

PHP Proxy for Cross Domain Requests
GNU General Public License v3.0
269 stars 141 forks source link

Content Type #13

Closed icodealone closed 8 years ago

icodealone commented 8 years ago

Very useful bit of code, thanks.

I am having an issue with making a request via the proxy though when using a CONTENT_TYPE of 'json/application'.

This fixed it:

foreach ( $_SERVER as $key => $value ) {
if ($key == 'CONTENT_TYPE')     
        $request_headers[] = "Content-Type: $value";
    elseif ( substr( $key, 0, 5 ) == 'HTTP_' )
softius commented 8 years ago

This is related to #11 and #12

softius commented 8 years ago

Thank you @bitblower . Recent code changes include this fix.