Skip to content

replace request.env['HTTP_HOST'] with request.host_with_port #389

New issue

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

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

Already on GitHub? # to your account

Merged
merged 1 commit into from
Apr 18, 2016

Conversation

edvakf
Copy link
Contributor

@edvakf edvakf commented Apr 18, 2016

request.env['HTTP_HOST'] doesn't respect X-Forwarded-Host, whereas request.host does

@LeFnord
Copy link
Member

LeFnord commented Apr 18, 2016

please add it to CHANGELOG and squash commits

@edvakf edvakf force-pushed the x_forwarded_host branch from 4871168 to 96e8bfe Compare April 18, 2016 15:39
@edvakf
Copy link
Contributor Author

edvakf commented Apr 18, 2016

@LeFnord Thank you. I've pushed them.

@LeFnord
Copy link
Member

LeFnord commented Apr 18, 2016

👍

@edvakf
Copy link
Contributor Author

edvakf commented Apr 18, 2016

It might actually be better to use host_with_port instead.

@edvakf
Copy link
Contributor Author

edvakf commented Apr 18, 2016

Let me push it again.

@edvakf edvakf force-pushed the x_forwarded_host branch from 96e8bfe to 3f02da5 Compare April 18, 2016 15:55
@edvakf edvakf changed the title replace request.env['HTTP_HOST'] with request.host replace request.env['HTTP_HOST'] with request.host_with_port Apr 18, 2016
@LeFnord
Copy link
Member

LeFnord commented Apr 18, 2016

please add a spec for last commit

request.env['HTTP_HOST'] doesn't respect X-Forwarded-Host,
whereas request.host does
@edvakf edvakf force-pushed the x_forwarded_host branch from 3f02da5 to be53496 Compare April 18, 2016 19:14
@edvakf
Copy link
Contributor Author

edvakf commented Apr 18, 2016

added

@LeFnord
Copy link
Member

LeFnord commented Apr 18, 2016

👍

@LeFnord LeFnord merged commit d777e83 into ruby-grape:master Apr 18, 2016
@edvakf edvakf deleted the x_forwarded_host branch April 19, 2016 00:56
LeFnord added a commit to LeFnord/grape-swagger that referenced this pull request Feb 9, 2019
replace request.env['HTTP_HOST'] with request.host_with_port
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants