79 lines
1.6 KiB
JSON
79 lines
1.6 KiB
JSON
{
|
|
"version": 2,
|
|
"timeout": "3000ms",
|
|
"cache_ttl": "300s",
|
|
"host": [
|
|
"http://api:8080"
|
|
],
|
|
"extra_config": {
|
|
"github_com/devopsfaith/krakend-metrics": {
|
|
"listen_address": ":8091"
|
|
},
|
|
"github_com/devopsfaith/krakend-gologging": {
|
|
"level": "DEBUG",
|
|
"prefix": "[KRAKEND]",
|
|
"syslog": false,
|
|
"stdout": true
|
|
},
|
|
"github_com/devopsfaith/krakend-opencensus": {
|
|
"sample_rate": 100,
|
|
"reporting_period": 1,
|
|
"exporters": {
|
|
"jaeger": {
|
|
"endpoint": "http://jaeger:14268",
|
|
"service_name": "krakend"
|
|
}
|
|
}
|
|
},
|
|
"github_com/devopsfaith/krakend-cors": {
|
|
"allow_origins": [
|
|
"http://localhost:8000"
|
|
],
|
|
"allow_methods": [
|
|
"POST",
|
|
"GET"
|
|
],
|
|
"allow_headers": [
|
|
"Origin",
|
|
"Authorization",
|
|
"Content-Type"
|
|
],
|
|
"expose_headers": [
|
|
"Content-Length"
|
|
],
|
|
"max_age": "12h"
|
|
}
|
|
},
|
|
"endpoints":[
|
|
{
|
|
"endpoint": "/sequential/{id}",
|
|
"backend": [
|
|
{
|
|
"url_pattern": "/users/{id}.json",
|
|
"whitelist": [
|
|
"id",
|
|
"username"
|
|
],
|
|
"extra_config": {},
|
|
"encoding": "json",
|
|
"blacklist": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"url_pattern": "/projects/{resp0_id}.json",
|
|
"whitelist": [
|
|
"name"
|
|
],
|
|
"group": "projects"
|
|
}
|
|
],
|
|
"extra_config": {
|
|
"github.com/devopsfaith/krakend/proxy": {
|
|
"sequential": true
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|