Swagger UI - “ TypeError: Failed to fetch” on valid response

后端 未结 9 1457
一生所求
一生所求 2020-12-14 02:27

I\'ve just pulled down the latest Swagger from the Git repo (3.0.19) using: https://github.com/swagger-api/swagger-ui.git and updated my API to use the new version.

9条回答
  •  眼角桃花
    2020-12-14 02:48

    I have encountered the same error while trying to authenticate access OAuth2 secured Rest API set. API server deployed on VM and was connecting to it using IPSEC VPN. Actually username/password in HTTP header with basic authentication was sent using separate API other than /oauth/token, backend itself was calling http://localhost:8080/api/v0/oauth/token with client secret and returning back token to client. After changing localhost to server's actual local IP , problem disappeared.

提交回复
热议问题