Giter Site home page Giter Site logo

Comments (5)

beetlex-io avatar beetlex-io commented on May 17, 2024 1

@eddyyuen
按道理不存在这情况,Bumblebee转发的过程会带上访问Bumblebee的host头信息

from bumblebee.

beetlex-io avatar beetlex-io commented on May 17, 2024

组件对同一个URL接口,来源于不同域名可以制定不同的转发,URL制定如下:
api1.server.com|/user.*

api2.server.com|/user.*

from bumblebee.

eddyyuen avatar eddyyuen commented on May 17, 2024

这个配置是把相同url的转发到不同的server。
我的需求是几个api server部署在同一台服务器的同一个端口(例如IIS)。访问时通过域名进行区分。
但是fasthttpapi连接api server是把域名解析为IP后进行连接的。这样IIS就不能区分转发后访问的是哪一个域名,通常就会默认解析为第一个。

from bumblebee.

eddyyuen avatar eddyyuen commented on May 17, 2024

@eddyyuen
按道理不存在这情况,Bumblebee转发的过程会带上访问Bumblebee的host头信息

是我的逻辑错了。因为访问的两个不同域名的接口,正因为带上了host头信息,IIS只认这个host。

from bumblebee.

beetlex-io avatar beetlex-io commented on May 17, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.