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

Fix host display when X_FORWARDED_HOST authorized #48941

Merged
merged 1 commit into from Aug 21, 2023

Commits on Aug 15, 2023

  1. Fix host display when X_FORWARDED_HOST authorized

    Previously, when a Request had a non-authorized HTTP_HOST but an
    authorized HTTP_X_FORWARDED_HOST, the HTTP_X_FORWARDED_HOST value would
    be displayed as the one being blocked. However, this could be confusing
    for users since that value would already be added to `config.hosts`.
    
    This commit addresses the issue by tweaking how the blocked host is
    displayed. Instead of always displaying Request#host (which will return
    X_FORWARDED_HOST when present whether or not that's the host being
    blocked), each host being blocked will be displayed on its own.
    
    Co-authored-by: Daniel Schlosser <Eusebius1920@users.noreply.github.com>
    skipkayhil and Eusebius1920 committed Aug 15, 2023
    Configuration menu
    Copy the full SHA
    11ef3ce View commit details
    Browse the repository at this point in the history