Skip to content

Host header is missing #2122

@by-nari

Description

@by-nari
Header: Accept-Encoding, Value: gzip
Header: Content-Length, Value: 50
Header: X-Forwarded-For, Value: 127.0.0.1
Header: X-Forwarded-Port, Value: 443
Header: Date, Value: Fri, 24 Oct 2025 09:03:56 GMT
Header: X-Original-Uri, Value: /auth/login
Header: User-Agent, Value: RapidAPI/4.4.3 (Macintosh; OS X/15.7.1) GCDHTTPRequest
Header: Content-Type, Value: application/json
Header: X-Forwarded-Host, Value: localhost:4000
Header: X-Forwarded-Proto, Value: http
Header: X-Forwarded-Scheme, Value: https
Header: X-Request-Id, Value: fd7bf62898ab078ec00d1eb91fcf5b2a
Header: X-Scheme, Value: https

Host header is missing in encore.CurrentRequest(). My custom logic needs the Host header to process requests. I tried injecting an X-Host header from the frontend, and Encore receives it, but I don't like this workaround. The Host header is standard — it shouldn’t be missing like this.

I'm designing multiple webhooks to receive payment signals from different payment gateways.
These webhooks are used by both the main site and various resellers (each with their own domain).
I need to read the Host header to determine which reseller the request belongs to.

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