Skip to content

--forwarded-allow-ips '*' broken in combination with gunicorn #2477

@Kludex

Description

@Kludex

Discussed in #2475

Originally posted by andreas-sch-b September 30, 2024
I'm running uvicorn in combination with gunicorn like this:

gunicorn -k uvicorn.workers.UvicornWorker --forwarded-allow-ips "*" ....

This worked well with the 0.30.6, however it's broken with the 0.31.0 of uvicorn. The issue got introduced with the PR [1]. The problem is, that the check for the wildcard changed. In the old version there was a check like "*" in trusted_hosts. The new code now checks for trusted_hosts == "*" which causes the problem.

[1] #2468

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions