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
Closed

Documentation suggestion: haproxy #9

dsadinoff opened this issue Mar 31, 2014 · 6 comments

Comments

@dsadinoff
Copy link

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
Copy link
Owner

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
Copy link
Author

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
Copy link
Author

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
Copy link
Owner

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
Copy link

dmyers 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
Copy link
Owner

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
Development

No branches or pull requests

3 participants