Skip to content

Host based route matching #51

Closed
Closed
@restyler

Description

@restyler

Hello,

I am considering switching to fast-gateway from my own custom quick&dirty gateway implementation based on http-proxy.
My use case is based on domains for APIs, instead of /prefixes, so basically I want api gateway to map current request to specific API service on the base of Host header.

Here is how I implement it in my own code:
https://github.com/restyler/api-gateway/blob/master/gateway/src/server.js#L113
https://github.com/restyler/api-gateway/blob/master/gateway/api.http#L7

Stub API servers are launched using vhost package ( https://github.com/restyler/api-gateway/blob/master/gateway/src/server.js#L141 ).

I am probably missing something, but I don't see obvious way to do the same trick in fast-gateway . Can you please point me to the right direction how this can be solved?
Thanks!

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