Ocelot 设置在 React 应用程序上重定向用户

发布于 2025-01-16 03:38:57 字数 212 浏览 4 评论 0原文

我们正在做一些服务器设置。 我们使用安装在服务器 Y 上的 Api 网关(Ocelot),它将连接到服务器 X 上托管的 API。 Server X 也有一个 React 应用程序。 服务器 Y 可以通过 Internet 访问,而服务器 X 可以从服务器 Y 访问。 现在 API 工作正常,但 React 应用程序未通过 ocelot(服务器 Y)打开。 那么问题是ocelot会打开react应用程序吗?

We are doing some server set up.
We are using a Api gateway(Ocelot) installed on the server Y which will connect to Apis hosted on server X.
Server X also has a react application.
Server Y is accessible over Internet where as server X is accessible from server Y.
Now the Apis are working perfectly but the react application is not opening through the ocelot ( server Y).
So question is will ocelot open react application?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

水波映月 2025-01-23 03:38:57

您是否在 DMZ 中部署 ocelot api 网关,并在防火墙后面部署 React-app 和 Web 服务、数据库,并仅允许通过浏览器、移动设备进行特定访问。

这是一个 PWA 网站,那么您应该小心地将 ocelot 用于不适合的用途。 ocelot 是一种 API 网关工具/技术,与 nginx 不同,它可以执行将调用路由到 Web 应用程序和 Web 服务的附加活动。

请检查 ocelot api gateway 的文档,如果它也允许 Web 应用程序路由。

Are you deploying the ocelot api gateway in a DMZ and the react-app and web services, database behind the firewall and allow only specific access via browser, mobile.

is this a pwa site, then you should be careful about using ocelot for something that is not intended for. ocelot is an api gateway tool/technology and not unlike nginx that can perform this additional activity of routing the calls to web application and web services.

please check the documentation of ocelot api gateway, if it allows for web application routing as well.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文