简体   繁体   中英

Traefik routing with based on the protocol / scheme

I have two docker containers running in the same server with domain app.example.com,

REST container - listening on port 80 for http://* requests WEBSOCKET container - listening on port 90 for ws://* requests

I want calls to http ://app.example.com routed to the REST container and calls to ws ://app.example.com routed to the WEBSOCKET

how do I do this with traefik?

It's not possible to route on scheme.

You can route on path, header, query, http Method, host, or ports.

https://docs.traefik.io/v1.5/basics/#matchers

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM