You can use Hypercorn's built-in ProxyFixMiddleware
like this:
from hypercorn.middleware import ProxyFixMiddleware
app = Quart(__name__)
fixed_app = ProxyFixMiddleware(app, mode="legacy", trusted_hops=1)
See the docs here: https://hypercorn.readthedocs.io/en/latest/how_to_guides/proxy_fix.html