first commit
This commit is contained in:
103
gateway/config/gateway.config.json
Normal file
103
gateway/config/gateway.config.json
Normal file
@@ -0,0 +1,103 @@
|
||||
{
|
||||
"http": {
|
||||
"port": 8080
|
||||
},
|
||||
"admin": {
|
||||
"port": 9876,
|
||||
"host": "localhost"
|
||||
},
|
||||
"apiEndpoints": {
|
||||
"api": {
|
||||
"host": "localhost",
|
||||
"paths": "/ip"
|
||||
},
|
||||
"user_client": {
|
||||
"host": "localhost",
|
||||
"paths": [
|
||||
"/user",
|
||||
"/user/*"
|
||||
]
|
||||
},
|
||||
"articles_client": {
|
||||
"host": "localhost",
|
||||
"paths": [
|
||||
"/articles",
|
||||
"/articles/*"
|
||||
]
|
||||
}
|
||||
},
|
||||
"serviceEndpoints": {
|
||||
"userbin": {
|
||||
"url": "http://127.0.0.1:3002"
|
||||
},
|
||||
"articlesbin": {
|
||||
"url": "http://127.0.0.1:3003"
|
||||
},
|
||||
"httpbin": {
|
||||
"url": "https://httpbin.org"
|
||||
}
|
||||
},
|
||||
"policies": [
|
||||
"basic-auth",
|
||||
"cors",
|
||||
"expression",
|
||||
"key-auth",
|
||||
"log",
|
||||
"oauth2",
|
||||
"proxy",
|
||||
"rate-limit"
|
||||
],
|
||||
"pipelines": {
|
||||
"default": {
|
||||
"apiEndpoints": [
|
||||
"api"
|
||||
],
|
||||
"policies": [
|
||||
{
|
||||
"proxy": [
|
||||
{
|
||||
"action": {
|
||||
"serviceEndpoint": "httpbin",
|
||||
"changeOrigin": true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"pipeline_user": {
|
||||
"apiEndpoints": [
|
||||
"user_client"
|
||||
],
|
||||
"policies": [
|
||||
{
|
||||
"proxy": [
|
||||
{
|
||||
"action": {
|
||||
"serviceEndpoint": "userbin",
|
||||
"changeOrigin": true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"pipeline_articles": {
|
||||
"apiEndpoints": [
|
||||
"articles_client"
|
||||
],
|
||||
"policies": [
|
||||
{
|
||||
"proxy": [
|
||||
{
|
||||
"action": {
|
||||
"serviceEndpoint": "articlesbin",
|
||||
"changeOrigin": true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user