src/Graviton/ProxyBundle/Controller/ProxyController.php
protected function cleanResponseHeaders(HeaderBag $headers)
    {
        $headers->remove('transfer-encoding'); // Chunked responses get not automatically re-chunked by graviton
        $headers->remove('trailer'); // Only for chunked responses, graviton should re-set this when chunking

        // Change naming to Graviton output Allow options
        if ($allow = $headers->get('Allow', false)) {
            $headers->set('Access-Control-Allow-Methods', $allow);
            $headers->remove('Allow');
        }
    }
protected function cleanResponseHeaders(HeaderBag $headers)
    {
        $headers->remove('transfer-encoding'); // Chunked responses get not automatically re-chunked by graviton
        $headers->remove('trailer'); // Only for chunked responses, graviton should re-set this when chunking

        // Change naming to Graviton output Allow options
        if ($allow = $headers->get('Allow', false)) {
            $headers->set('Access-Control-Allow-Methods', $allow);
            $headers->remove('Allow');
        }
    }
protected function cleanResponseHeaders ( HeaderBag $ headers ) { $ headers -> remove ( 'transfer-encoding' ) ; // Chunked responses get not automatically re-chunked by graviton $ headers -> remove ( 'trailer' ) ; // Only for chunked responses, graviton should re-set this when chunking // Change naming to Graviton output Allow options if ( $ allow = $ headers -> get ( 'Allow' , false ) ) { $ headers -> set ( 'Access-Control-Allow-Methods' , $ allow ) ; $ headers -> remove ( 'Allow' ) ; } }
Removes some headers from the thirdparty API's response. These headers get always invalid by graviton's
forwarding and should therefore not be delivered to the client.

@param HeaderBag $headers The headerbag holding the thirdparty API's response headers

@return void
Removes some headers from the thirdparty API s response . These headers get always invalid by graviton s forwarding and should therefore not be delivered to the client .