Skip to content

Use nginx's parsed hostname #950

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

Closed

Conversation

Ngo-The-Trung
Copy link

Within the module the request structure's hostname is assigned by ngx_cycle->hostname, which in turn is assigned gethostname(). I don't understand why this is the case, it's not the same as the Host header which tells which virtual host is being targeted by the request.

This pull request uses nginx's parsed Host header for req->hostname instead.

@zimmerle
Copy link
Contributor

Hi @TrungACZNE,

Thank you for your patch! The code is now on the hands of our Buildbots.

@zimmerle
Copy link
Contributor

Thanks again @TrungACZNE!

Your patch is now merge into nginx_refactoring branch.

@zimmerle zimmerle closed this Dec 11, 2015
zimmerle pushed a commit that referenced this pull request Feb 1, 2016
zimmerle pushed a commit that referenced this pull request Feb 2, 2016
zimmerle pushed a commit that referenced this pull request Feb 2, 2016
daniilyar pushed a commit to daniilyar/ModSecurity that referenced this pull request Feb 5, 2016
daniilyar pushed a commit to daniilyar/ModSecurity that referenced this pull request Feb 5, 2016
chewi pushed a commit to yakara-ltd/ModSecurity that referenced this pull request May 2, 2016
chewi pushed a commit to yakara-ltd/ModSecurity that referenced this pull request May 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants