Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Put headers and request headers before proxy #1306

Merged
merged 1 commit into from Dec 22, 2015

Conversation

quixoten
Copy link
Contributor

I have scenario where I need the request headers template to be rendered before the proxy template so I can remove an Authorization header before it goes across the proxy, e.g.,

## Request header rules
## as per http://httpd.apache.org/docs/2.2/mod/mod_headers.html#requestheader
RequestHeader unset Authorization

## Proxy rules
...

When the RequestHeader unset directive is after the proxy section, the header is sent to the proxy.

This change allows the order parameter of the request headers template to be changed without affecting current behavior.

@dteirney
Copy link

I think have run into this issue but never spent the time to figure out why. Is there any downside (other than an upgrade will change files) to having the request headers always before the proxy section?

The current API of a number to change it seems related to quite internal implementation details.

@quixoten
Copy link
Contributor Author

@dteirney, I don't know of any downsides to explicitly re-ordering it, but I'm not deeply familiar with apache so I started with the safest route. I have no issues with changing it though.

@igalic
Copy link
Contributor

igalic commented Dec 18, 2015

Request/Headers should be earlier on in the vhost.

@quixoten
Copy link
Contributor Author

I re-ordered so that the headers and request headers templates are rendered just before the proxy template.

@igalic
Copy link
Contributor

igalic commented Dec 22, 2015

@quixoten could you squash your changes down to one?
(and from what i gather, a rebase should guarantee that pcci will make trusty actually pass)

@quixoten
Copy link
Contributor Author

Squashed.

@igalic igalic changed the title Allow re-ordering of request_headers Put headers and request headers before proxy Dec 22, 2015
igalic added a commit that referenced this pull request Dec 22, 2015
Put headers and request headers before proxy
@igalic igalic merged commit 05437c0 into puppetlabs:master Dec 22, 2015
@igalic
Copy link
Contributor

igalic commented Dec 22, 2015

merged! thanks @quixoten!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants