fizzgate / fizz-gateway-node Goto Github PK
View Code? Open in Web Editor NEW微服务API聚合网关 An Aggregation API Gateway
Home Page: http://www.fizzgate.com
License: GNU General Public License v3.0
微服务API聚合网关 An Aggregation API Gateway
Home Page: http://www.fizzgate.com
License: GNU General Public License v3.0
网关访问地址格式为: http://{fizz网关ip:port}/proxy/{前端服务名}/{前端API路径}
I`m looking for a new gateway to replace our old gateway.
The new gateway should be compitable with the route rule of old gateway, but the format of the access url for fizz that is too fixed. It have to use "proxy" field in the url, and do not support config or do not use the field.
add function comment for common.js
通过编排,县调用A接口,后调用B接口,
B接口的返回为 JsonArray类型的,配置通配符 * -> step2.request1.response.body 的时候,返回为空。
样例的配置json如下:
{
"debug": true,
"method": "POST",
"validateResponse": {
"headers": {},
"fixedBody": {
"msgCode": "404"
},
"fixedHeaders": {},
"body": {
"errorMsg": "string validateMsg"
},
"script": {}
},
"paramsDef": {
"type": "object",
"properties": {
"password": {
"type": "string",
"title": "mima"
},
"username": {
"type": "string",
"title": "yonghu"
}
},
"required": [
"username"
]
},
"dataMapping": {
"response": {
"headers": {},
"fixedBody": {},
"fixedHeaders": {},
"body": {
"*": "string step2.request1.response.body"
},
"script": {}
}
},
"type": "REQUEST",
"version": 19,
"path": "/proxytest/test/userserv/api/user/systeminfos",
"langDef": {
"langMapping": {
"zh": "zh"
},
"langParam": ""
},
"headersDef": {
"type": "object",
"properties": {},
"required": []
},
"stepConfigs": [
{
"stop": false,
"dataMapping": {},
"name": "step1",
"requests": [
{
"method": "POST",
"dataMapping": {
"request": {
"headers": {},
"fixedParams": {},
"fixedBody": {},
"fixedHeaders": {},
"body": {
"*": "string input.request.body"
},
"params": {
"*": "string input.request.params"
},
"script": {}
},
"response": {
"headers": {},
"fixedBody": {},
"fixedHeaders": {},
"body": {
"*": "string step1.request1.response.body"
},
"script": {}
}
},
"testUrl": "http://userserver:20100/userserv/oauth/token",
"type": "REQUEST",
"url": "http://userserver:20100/userserv/oauth/token",
"timeout": "3000",
"conditionFlag": false,
"devUrl": "http://userserver:20100/userserv/oauth/token",
"condition": {},
"prodUrl": "http://userserver:20100/userserv/oauth/token",
"name": "request1",
"preUrl": "http://userserver:20100/userserv/oauth/token",
"fallback": {
"mode": "stop"
}
}
]
},
{
"stop": false,
"dataMapping": {},
"name": "step2",
"requests": [
{
"method": "GET",
"dataMapping": {
"request": {
"headers": {
"Authorization": {
"source": "function dyFunc(paramsJsonStr) {\n var context = JSON.parse(paramsJsonStr)['context'];\n var data = common.getStepRespBody(context, 'step1', 'request1', '');\n var token = data['access_token'];\n return \"bearer \" + token;\n}\n",
"aggregate_config_script_id": 2,
"type": "javascript"
}
},
"fixedParams": {},
"fixedHeaders": {},
"params": {},
"script": {}
},
"response": {
"headers": {},
"fixedBody": {},
"fixedHeaders": {},
"body": {
"*": "string step2.request1.response.body"
},
"script": {}
}
},
"testUrl": "http://userserver:20100/userserv/api/user/systeminfos",
"type": "REQUEST",
"url": "http://userserver:20100/userserv/api/user/systeminfos",
"timeout": "3000",
"conditionFlag": false,
"devUrl": "http://userserver:20100/userserv/api/user/systeminfos",
"condition": {},
"prodUrl": "http://userserver:20100/userserv/api/user/systeminfos",
"name": "request1",
"preUrl": "http://userserver:20100/userserv/api/user/systeminfos",
"fallback": {
"mode": "stop"
}
}
]
}
],
"name": "queryuserInfo",
"bodyDef": {
"type": "object",
"properties": {},
"required": []
},
"id": "d9a7ce93-5cc4-43ea-9227-0cedc3d20b28",
"scriptValidate": {}
}
Support to upload custom javascript library in admin console, call custom js function in aggregation api.
fixed applicationContext null pointer exception in gateway aggregation
add the top five slowest services panel
add the top five most frequently called services panel
add the top five services with the most errors panel
Our team want use fizz with docker, but it will support in v1.6.x, could you move it to 1.5.x?
To be compatible with the old system, such as old api gateway which using "app-id" or "signature" as header name, a secondary custom configurable appid/sign header name is required
Can't fill the parent menu input with null after the parent menu was set in the gateway admin UI.
Sincerely thank everyone who constantly keeps on using and supporting Fizz Gateway. We will try our best to make Fizz Gateway better and make the community and ecology more prosperous.
Please submit a comment in this issue to include the following information:
your company, school or organization.
your city and country.
your contact info: weibo, email, wechat (at least one).
for what business scenario do you use Fizz.
You can refer to the following sample answer:
* Organization: Fizz Gateway
* Location: GuangZhou, China
* Contact: [email protected]
* Purpose: as a API gateway to deal with east-west traffic between microservices.
Thanks again for your participation! Your support is the motivation for us to move forward.
Fizz Gateway community
感谢正在使用和关注 Fizz Gateway 的开发者,我们会持续投入,让 Fizz Gateway 项目和社区更加繁荣。
在此提交一条评论, 评论内容包括:
您所在公司、学校或组织
您所在的城市、国家
您的联系方式: 微博、邮箱、微信 (至少一个)
您将 Fizz Gateway 用于哪些业务场景
可以参考下面的示例:
组织: Fizz Gateway
地点:**广州
联系方式: [email protected]
使用场景:作为应用网关处理授权方面的问题
多谢您的支持!
Fizz Gateway 社区
when using service orchestration, users should input http://ip:port/xxxxx (backend service), such as
what we want to input :
group means several backend ip:port with rotation and health check
add embedded default common.js in classpath, default common.js would be used while there is not js/common.js in the deployment root folder
Add content parser to parse the content according to content-type header
May be Apollo and euraka can be upgraded to nacos be better, euraka's open source code gradually abandoned maintenance
Through making a online api group copy into sandbox , we can produce a copy api without pollute the online data.
Support custom business data that could be used in aggregation、plugin etc.
我们目前有这样普遍紧急一个场景,需要 acl与流控, 项目A-client 注册到nacos 调用 项目B-server 注册到nacos, A与B都是内部业务系统服务,可以理解 两个微服务;
有一大部分业务场景(如金融业务场景) api 很敏感,需要权限控制只允许指定的业务客户端可以访问;
最后希望 :服务网关在服务治理方面也有它的发挥作用的地方
Add content parser for api response body in gateway aggregation
后端微服务采用dubbo等其他非spring cloud技术栈的后端应用,请问怎么接入呢?
按照部署教程部署之后, 访问 http://ip:8000/fizz-manager/ (我的ip, 我部署在阿里云主机上, 使用的公网ip)
会出现以下错误, 咨询一下如何解决
code | 404 |
---|---|
success | false |
data | {} |
msg | "No handler found for GET /fizz-manager/" |
no service config
2020-12-17 11:42:12.989 [fizz-el-nio-2] WARN we.plugin.auth.ApiConfigService - mytest no service config
2020-12-17 11:42:12.999 [fizz-el-nio-2] ERROR we.util.WebUtils - b08ba8bd-2 GET http://localhost:8600/proxytest/mytest/wea
support redirect(http status 301) in aggregation
新增接口-接口方法只有get和post 希望可以新增HEAD, PUT, PATCH, DELETE, OPTIONS, TRACE方法
Return exception information for trouble shooting while failed to execute script
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.