Skip to content

Building 70 Projects ranging from beginner to advanced so anyone can β€” learn from, build upon, use as a reference, or even copy directly. Owned by my cybersecurity company πŸ‘‡

1.2 KB
Raw Blame
version: 1

listen:
  - port: 8081

upstreams:
  - name: http-backend
    servers:
      - host: "127.0.0.1:8000"
        weight: 1

  - name: ws-backend
    servers:
      - host: "127.0.0.1:8002"
        weight: 1

  - name: sse-backend
    servers:
      - host: "127.0.0.1:8003"
        weight: 1

routes:
  - host: "localhost"
    paths:
      - path: /ws
        upstream: ws-backend
      - path: /events
        upstream: sse-backend
      - path: /stream
        upstream: sse-backend
      - path: /
        upstream: http-backend

  - host: "localhost:8081"
    paths:
      - path: /ws
        upstream: ws-backend
      - path: /events
        upstream: sse-backend
      - path: /stream
        upstream: sse-backend
      - path: /
        upstream: http-backend

  - host: "127.0.0.1:8081"
    paths:
      - path: /ws
        upstream: ws-backend
      - path: /events
        upstream: sse-backend
      - path: /stream
        upstream: sse-backend
      - path: /
        upstream: http-backend

  - host: "ws.localhost"
    paths:
      - path: /
        upstream: ws-backend

  - host: "sse.localhost"
    paths:
      - path: /
        upstream: sse-backend