Skip to content

Commit

Permalink
feat: docker example
Browse files Browse the repository at this point in the history
  • Loading branch information
Aitthi committed Mar 9, 2024
1 parent 44f4737 commit 8157ce6
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 2 deletions.
40 changes: 40 additions & 0 deletions examples/docker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Select the service to be proxied
service_selector:
header: x-easy-proxy-svc # from header key "x-easy-proxy-svc"

# Services to be proxied
services:
- name: backend_service_docker
algorithm: round_robin # round_robin, random, consistent, weighted
health_check:
path: /health
endpoints:
- ip: 172.20.0.1
port: 3002
weight: 1 # Optional
- ip: 172.20.0.1
port: 3003
weight: 1 # Optional

# A list of routes to be proxied
routes:
- host: localhost:8088
del_headers:
- accept
add_headers:
- name: x-custom-header # no case sensitive
value: "123" # olny string
paths:
- pathType: Exact # Exact, Prefix
path: /
service:
name: backend_service_docker
- pathType: Exact # Exact, Prefix
path: /favicon.ico
service:
name: backend_service_docker
- pathType: Prefix # Exact, Prefix
path: /api/v1
service:
rewrite: /service/v1 # Optional
name: backend_service_docker
3 changes: 1 addition & 2 deletions examples/proxy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ services:

# A list of routes to be proxied
routes:
# - host: mydomain.com
- host: localhost:8088
- host: mydomain.com
del_headers:
- accept
add_headers:
Expand Down

0 comments on commit 8157ce6

Please sign in to comment.