wso2 - Devportal 组合框中的“localhost”不使用我的 VMware 的 IP 地址,但页面的 URL 可以
问题描述
我已经在 Docker/VMware/Linux 上安装了 WSO2 API Manager 3.2,当我想测试从“ Devportal ”在“Publisher”上创建和发布的 API 时,选择 URL 地址的服务器组合框总是显示https://localhost: 8243/test/1.0,但我想要:https://xx27.197:8243/test/1.0
当我在 Postman 上测试相同的 URL(https://xx27.197:8243/test/1.0)时,它成功了!
非常感谢。
解决方案
您是否尝试更改网关环境配置deployment.toml
?http_endpoint
您可以通过更新配置中的和值来更改网关 url 值https_endpoint
。
例如,
[[apim.gateway.environment]]
name = "Production and Sandbox"
type = "hybrid"
display_in_api_console = true
description = "This is a hybrid gateway that handles both production and sandbox token traffic."
show_as_token_endpoint_url = true
service_url = "https://localhost:${mgt.transport.https.port}/services/"
username= "${admin.username}"
password= "${admin.password}"
ws_endpoint = "ws://localhost:9099"
wss_endpoint = "wss://localhost:8099"
http_endpoint = "http://<your_ip>:${http.nio.port}"
https_endpoint = "https://<your_ip>:${https.nio.port}"
有关更多信息,请参阅此。
推荐阅读
- http - Kong:如何按服务和限制大小列出路线?
- javascript - 登录 Java Javascript 上的 ResponseText
- user-interface - 如何在 Google Apps 脚本中创建文件上传提示
- spring-boot - 在独立应用程序中使用 Spring WebClient
- docker - Dockerfile的env看不到其他环境变量?
- java - 向用户公开数据库查询
- json - 使用 React Native 显示来自 WordPress REST API 的标题和特色图片
- java - 我需要应用程序中的字体大小不会因更改设置字体大小而受到影响
- python - 基于随机数将值关联到行
- python - 我有一个字典值列表,我想要列表的第一个索引。如何迭代它?