随笔 - 836  文章 - 1 评论 - 40 阅读 - 102万
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

7.2Choose Security and click on ADD PLUGIN in cors,then don’t input content and click on ADD PLUGIN button directly.

 

 

第一步登录:

  第二步: 设置你需要代理的ip 和端口

2.3.3Add Service
1.open kong dashboard http://10.160.3.48:7999
2.Click on ADD NEW SERVICE button to add a new service.

 

 

3.Set value for the service,then click on SUBMIT SERVICE button.
   Port: change to your service’s port.

 

 

 

 

 

 

 

 

 

设置路由:

4.Click on serviceName to set route. Such as userService.

6.Set route info for the service.
   Path: change the paths value.
   Method: input a method ,need to click on ENTER key.
        HEAD,GET,POST,DELETE,PUT,OPTIONS,PATCH

 设置访问代理服务的路径, 然后通过10.160.3.48:8000/user    访问服务

 

  //设置允许跨域

7.Set cors for service which will be called by UI service.such as: user service,role service.

 

7.1click on ADD PLUGIN

 

 

7.2Choose Security and click on ADD PLUGIN in cors,then don’t input content and click on ADD PLUGIN button directly.

 

 

 

访问你的服务:http    :      http://kongIP:8000/路由到服务的path

                         https   :     https://kongIP:8443/路由到服务的path

posted on   lshan  阅读(974)  评论(0编辑  收藏  举报
编辑推荐:
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· AI 智能体引爆开源社区「GitHub 热点速览」
· 三行代码完成国际化适配,妙~啊~
· .NET Core 中如何实现缓存的预热?
历史上的今天:
2018-05-23 mock——test 基本所有使用
点击右上角即可分享
微信分享提示