Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

Send typical proxy headers #33

Closed
wants to merge 2 commits into from

Conversation

ankon
Copy link
Contributor

@ankon ankon commented Mar 24, 2016

It would be nice if the proxy logic would send over some headers to the origin server:

  1. HTTP/1.1 usage
  2. X-Forwarded-For, X-Forwarded-Proto, X-Forwarded-Port headers, so the origin can understand the original source of the request
  3. X-Request-Start so it is possible to track timings of the requests from the beginning

Note that I made the X-headers conditional on a new 'headers' configuration option, mainly because having the X-Forwarded-Proto seems to break origins on AWS cloudfront some reason.

This is on top of #32, although that would not be required.

@hone
Copy link
Member

hone commented Mar 24, 2016

Can you split this from #32 and #30? I'll need to look at some of these headers but it looks good.

ankon added 2 commits March 29, 2016 10:24
Each proxy configuration block can now optionally have a 'headers' entry,
which should be an array of the headers to provide to the proxied place.

Currently supported headers:
* X-Forwarded-Proto
* X-Forwarded-For
* X-Forwarded-Port
@ankon ankon force-pushed the improvement/proxy-headers branch from d38bb78 to 038c6e1 Compare March 29, 2016 08:25
@hone
Copy link
Member

hone commented Jun 10, 2016

@jmervine thoughts?

@jmervine
Copy link

I love the x- stuff... I'd need to do some more research to comment on the following...

      proxy_http_version 1.1;
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection "upgrade";
      proxy_set_header Host $proxy_host;

@jmervine
Copy link

@rdsharma

@James1x0
Copy link

Hi there, it's been a few years... can we please get proxy header support? Please!

@Subtletree
Copy link

@hone @schneems would this PR get looked at after a rebase and some added clarity around the extra headers?

@edmorley
Copy link
Member

edmorley commented Jun 9, 2022

Hi

This buildpack is now deprecated and we are recommending people move the more actively maintained heroku-buildpack-nginx. For migration advice see here.

As such, I'm closing this PR out since we won't be making further changes to this buildpack.

@edmorley edmorley closed this Jun 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants