Created
September 29, 2017 01:14
-
-
Save codesuki/f0514368a30b483058007f5fe383cff2 to your computer and use it in GitHub Desktop.
Envoy gRPC-web
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"listeners": [ | |
{ | |
"address": "tcp://0.0.0.0:9000", | |
"filters": [ | |
{ | |
"type": "read", | |
"name": "http_connection_manager", | |
"config": { | |
"access_log": [ | |
{ | |
"path": "/dev/stdout" | |
} | |
], | |
"codec_type": "auto", | |
"stat_prefix": "ingress_http", | |
"route_config": { | |
"virtual_hosts": [ | |
{ | |
"name": "backends", | |
"domains": ["*"], | |
"cors": { | |
"allow_origin":["*"] | |
}, | |
"routes": [ | |
{ | |
"timeout_ms": 0, | |
"prefix": "/package.service", | |
"cluster": "service.default.svc.cluster.local", | |
"cors": { | |
"allow_origin": ["*"], | |
"allow_headers": "content-type,x-grpc-web", | |
"allow_methods": "POST" | |
} | |
}, | |
{ | |
"timeout_ms": 0, | |
"prefix": "/", | |
"cluster": "frontend" | |
} | |
] | |
} | |
] | |
}, | |
"filters": [ | |
{ | |
"type": "both", | |
"name": "cors", | |
"config": {} | |
}, | |
{ | |
"type": "both", | |
"name": "grpc_web", | |
"config": {} | |
}, | |
{ | |
"type": "decoder", | |
"name": "router", | |
"config": {} | |
} | |
] | |
} | |
} | |
] | |
} | |
], | |
"admin": { | |
"access_log_path": "/dev/stdout", | |
"address": "tcp://0.0.0.0:8001" | |
}, | |
"cluster_manager": { | |
"clusters": [ | |
{ | |
"name": "service.default.svc.cluster.local", | |
"features": "http2", | |
"connect_timeout_ms": 250, | |
"type": "strict_dns", | |
"lb_type": "round_robin", | |
"hosts": [{"url": "tcp://service.default.svc.cluster.local:9000"}] | |
}, | |
{ | |
"name": "frontend", | |
"connect_timeout_ms": 250, | |
"type": "strict_dns", | |
"lb_type": "round_robin", | |
"hosts": [{"url": "tcp://docker.for.mac.localhost:8080"}] | |
} | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment