Comments (5)
@eddyyuen
按道理不存在这情况,Bumblebee转发的过程会带上访问Bumblebee的host头信息
from bumblebee.
组件对同一个URL接口,来源于不同域名可以制定不同的转发,URL制定如下:
api1.server.com|/user.*
或
api2.server.com|/user.*
from bumblebee.
这个配置是把相同url的转发到不同的server。
我的需求是几个api server部署在同一台服务器的同一个端口(例如IIS)。访问时通过域名进行区分。
但是fasthttpapi连接api server是把域名解析为IP后进行连接的。这样IIS就不能区分转发后访问的是哪一个域名,通常就会默认解析为第一个。
from bumblebee.
@eddyyuen
按道理不存在这情况,Bumblebee转发的过程会带上访问Bumblebee的host头信息
是我的逻辑错了。因为访问的两个不同域名的接口,正因为带上了host头信息,IIS只认这个host。
from bumblebee.
@eddyyuen
是你想host信息是你配置服务的域名而不是请求的域名?要是这样只能通过代码扩展才能实现,在0.9之前的版本其实可以通过AgentRequesting事件中设置,在事件里得到当前agentserver的配置的host,然后设置到request.Header中即可。
新版本看
https://github.com/IKende/Bumblebee/blob/master/Bumblebee.BaseSample/Program.cs
from bumblebee.
Related Issues (20)
- websocket 可以作为一个插件存在于网关吗
- 请问网关怎么支持websoket转发呢 HOT 2
- 修改了一下 consul服务发现插件
- 请问什么时候 能支持 http2 呢 HOT 2
- Nuget HOT 1
- 感谢 IKende 的 Bumblebee
- 网关有两个插件目前无法使用 HOT 1
- 请求路由问题 HOT 4
- 一个限流插件 NetCoreRateLimit
- 转发慢的问题咨询 HOT 4
- 关于插件的咨询 HOT 3
- Gateway配置完成后,无法进行转发 HOT 2
- JWT统一认证配置 HOT 2
- https support HOT 3
- 突然间报ssl错误 HOT 6
- Object reference not set to an instance of an object. HOT 20
- 插件的咨询 HOT 9
- 网关使用插件失效问题 HOT 2
- 《WebApi网关1.5.8发布》文章中的最后是正式版需要付费授权吗? HOT 1
- request queue overflow HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bumblebee.