2017 © Pedro Peláez
 

symfony-bundle modify-request-headers-bundle

Symfony bundle to inject request headers

image

epilgrim/modify-request-headers-bundle

Symfony bundle to inject request headers

  • Thursday, June 20, 2013
  • by epilgrim
  • Repository
  • 1 Watchers
  • 0 Stars
  • 99 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 9 Versions
  • 0 % Grown

The README.md

ModifyRequestHeadersBundle

This bundle allows to add arbitrary request headers to the Request object., (*1)

The use case that forced me to develop it, was because my application is behind a reverse proxy, wich is not setting the headers x-forwarded-proto. Thus, links sended by mail had an incorrect protocol., (*2)

Features include:, (*3)

  • Set the custom headers
  • Set the priority we want the listener to run when the kernel event.

Build Status, (*4)

Installation

  1. Download EpilgrimModifyRequestHeadersBundle using composer
  2. Enable the Bundle
  3. Configure your application's config.yml

Step 1: Download EpilgrimModifyRequestHeadersBundle using composer

Add EpilgrimModifyRequestHeadersBundle in your composer.json:, (*5)

{
    "require": {
        "epilgrim/modify-request-headers-bundle": "*"
    }
}

And then run, (*6)

``` bash $ php composer.phar update, (*7)


### Step 2: Enable the bundle Enable the bundle in the kernel: ``` php <?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Epilgrim\ModifyRequestHeadersBundle\EpilgrimModifyRequestHeadersBundle(), ); }
  1. Configure your application's config.yml

``` yaml, (*8)

app/config/config.yml

epilgrim_modify_request_headers: headers: - {name: x_forwarded_proto, value: https} - {name: header2, value: value_2} listener_priority: 64 ``` You can add as many headers as you want., (*9)

Notes

It's important to note that the listener_priority must be set higher than the subsequent listener making use of the headers. For example, if you modify the x_forwarded_proto, it is used by the RouterListener (running with priority 32). Thus, you must set something higher. It defaults to 64. If the key epilgrim_modify_request_headers is not added to app/config/config.yml, then the listener won´t be registered., (*10)

License

This bundle is under the MIT license., (*11)

Reporting an issue or a feature request

Issues and feature requests are tracked in the Github issue tracker., (*12)

The Versions

20/06 2013

dev-master

9999999-dev http://github.com/Epilgrim/ModifyRequestHeadersBundle

Symfony bundle to inject request headers

  Sources   Download

MIT

The Requires

 

The Development Requires

by Juan Peri

reverse proxy request headers

20/06 2013

v0.1.7

0.1.7.0 http://github.com/Epilgrim/ModifyRequestHeadersBundle

Symfony bundle to inject request headers

  Sources   Download

MIT

The Requires

 

The Development Requires

by Juan Peri

reverse proxy request headers

17/04 2013

v0.1.6

0.1.6.0 http://github.com/Epilgrim/ModifyRequestHeadersBundle

Symfony bundle to inject request headers

  Sources   Download

MIT

The Requires

 

The Development Requires

by Juan Peri

reverse proxy request headers

17/04 2013

v0.1.5

0.1.5.0 http://github.com/Epilgrim/ModifyRequestHeadersBundle

Symfony bundle to inject request headers

  Sources   Download

MIT

The Requires

 

The Development Requires

by Juan Peri

reverse proxy request headers

17/04 2013

v0.1.4

0.1.4.0 http://github.com/Epilgrim/ModifyRequestHeadersBundle

Symfony bundle to inject request headers

  Sources   Download

MIT

The Requires

 

The Development Requires

by Juan Peri

reverse proxy request headers

17/04 2013

v0.1.3

0.1.3.0 http://github.com/Epilgrim/ModifyRequestHeadersBundle

Symfony bundle to inject request headers

  Sources   Download

MIT

The Requires

 

The Development Requires

by Juan Peri

reverse proxy request headers

17/04 2013

v0.1.2

0.1.2.0 http://github.com/Epilgrim/ModifyRequestHeadersBundle

Symfony bundle to inject request headers

  Sources   Download

MIT

The Requires

 

The Development Requires

by Juan Peri

reverse proxy request headers

17/04 2013

v0.1.1

0.1.1.0 http://github.com/Epilgrim/ModifyRequestHeadersBundle

Symfony bundle to inject request headers

  Sources   Download

MIT

The Requires

 

The Development Requires

by Juan Peri

reverse proxy request headers

17/04 2013

v0.1

0.1.0.0 http://github.com/Epilgrim/ModifyRequestHeadersBundle

Symfony bundle to inject request headers

  Sources   Download

MIT

The Requires

 

The Development Requires

by Juan Peri

reverse proxy request headers