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

Documentation suggestion: haproxy #9

Closed
dsadinoff opened this issue Mar 31, 2014 · 6 comments

Comments

@dsadinoff
Copy link

commented Mar 31, 2014

For proxies such as haproxy, I would suggest that we mention the following snippet in the docs:

/* fixup the request proxy interpreter for haproxy */
   Request::setTrustedHeaderName(Symfony\Component\HttpFoundation\Request::HEADER_CLIENT_PROTO,'X_FORWARDED_SCHEME');
@fideloper

This comment has been minimized.

Copy link
Owner

commented Mar 31, 2014

Cool -

It looks like I could use some explanation as well. It sounds like HAProxy uses a different x-forwared-for header than expected?

Does that code define which header to use (X_FORWARDED_SCHEME) in place of X-Forwarded-Proto when it determines the protocol?

Thanks!

@dsadinoff

This comment has been minimized.

Copy link
Author

commented Mar 31, 2014

That's right. This arguably belongs in the Laravel docs, but since your entire module is a patch for the Laravel proxy system, I figure this is the right place for a patch to the proxy docs as well.

@dsadinoff

This comment has been minimized.

Copy link
Author

commented Mar 31, 2014

Now I'm second-guessing myself on this one. I'm beginning to believe that my whole X-forwarded-scheme vs X-forwarded-proto weirdness was the result of following someone's nginx + haproxy recipe blindly.

Never mind.

@fideloper

This comment has been minimized.

Copy link
Owner

commented Mar 31, 2014

Let me know what you find! It's totally possible haproxy does something
weird.

On Monday, March 31, 2014, dsadinoff notifications@github.com wrote:

Now I'm second-guessing myself on this one. I'm beginning to believe that
my whole X-forwarded-scheme vs X-forwarded-proto weirdness was the result
of following someone's nginx + haproxy recipe blindly.

Never mind.

Reply to this email directly or view it on GitHubhttps://github.com//issues/9#issuecomment-39098690
.

@dmyers

This comment has been minimized.

Copy link

commented Oct 26, 2014

I've also had this problem when using proxypass in Apache with AWS load balancer and Laravel doesn't know the original request was https so the asset urls use http.

Is it possible that line you added in the beginning could fix this?

@fideloper

This comment has been minimized.

Copy link
Owner

commented Jan 12, 2015

Marking as duplicate to #7, as the solution is the same. I'm hoping to add that as a configuration available (and documenting it).

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.