wso2 api manager. перенаправить на локальный хост - PullRequest
1 голос
/ 02 марта 2020

Помогите пожалуйста я установил wso2 APIM и сейчас настраиваю. Я создал новый REST API и ввел URL «View in Dev Portal», перенаправленный на localhost. Я изменил имя хоста в deploy.toml (ip-addr). Зачем для меня перенаправление на localhost?

Ответы [ 4 ]

1 голос
/ 02 марта 2020

Раскомментируйте и обновите эту конфигурацию.

#[apim.devportal]
#url = "https://localhost:${mgt.transport.https.port}/devportal"
0 голосов
/ 02 марта 2020

Войдите в консоль Carbon (/ carbon) и go для поставщиков услуг, выберите Store / Dev Portal в качестве приложения, разверните Входящую конфигурацию аутентификации и нажмите на кнопку edit. Он откроет конфигурации входящей аутентификации, отредактирует URL-адрес обратного вызова, заменив localhost вашим IP / именем хоста и обновив его.

Теперь dev-портал не будет перенаправлен на localhost.

То же самое относится и к издателю.

0 голосов
/ 02 марта 2020

Из документации:

By default, WSO2 products identify the hostname of the current machine through the Java API. However, this value sometimes yields erroneous results on some environments. Therefore, users are recommended to configure the hostname. The following procedure explains how to change the hostname and management hostname of WSO2 API Manager (WSO2 API-M) as required for your production environment.

Update the deployment.toml file.

Open the <API-M_HOME>/repository/conf/deployment.toml file

Define the hostname attribute under server configurations as shown below.

Format

[server]
hostname = "{hostname}"
Example
{hostname} - Hostname or IP address of the machine hosting this server. This is will become part of the End Point Reference of the services deployed on this server instance.

Configure the Developer Portal URL, which is used to access the Developer Portal via the Publisher.

Uncomment the following configuration and define the hostname.


[apim.devportal]
url = "https://<hostname>:${mgt.transport.https.port}/devportal"
Generate a key store, export the public certificate from the keystore, and import that certificate to the client­-truststore.jks file.

For more information, see Creating New Keystores.

Restart the server.

Если я изменил имя хоста и записал в deploy.toml, мне следует создать новое хранилище ключей?

0 голосов
/ 02 марта 2020

Спасибо Би за ответ,

Сделано, но не работает ....

[apim.devportal]
url = "https://192.168.3.148:${mgt.transport.https.port}/devportal"
#enable_application_sharing = false
#if application_sharing_type, application_sharing_impl both defined priority goes to application_sharing_impl
#application_sharing_type = "default" #changed type, saml, default #todo: check the new config for rest api
#application_sharing_impl = "org.wso2.carbon.apimgt.impl.SAMLGroupIDExtractorImpl"
#display_multiple_versions = false
#display_deprecated_apis = false
#enable_comments = true
#enable_ratings = true
#enable_forum = true
...