Skip to content

Do not lose the Host information when using Miniflare with upstream option. #11876

@aleixmorgadas

Description

@aleixmorgadas

Describe the solution

We are using the Miniflare with the upstream option as a proxy. Yet, we need to know which is the host origin.

When using the upstream option, the headers Host and Forwarded-Host becomes the upstream, losing the original hostname along the way.

We need this because we have multiple domains, so, rewriting the Forwarded-Host with a constant isn't an option.

But, if Miniflare stores the information in a header, like X-MINIFLARE-ORIGINAL-HOSTNAME, we can reuse that on outboundService function, and other functions using the workerContext.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions