【发布时间】:2019-12-16 10:20:23
【问题描述】:
我一直在研究这个例子https://github.com/varghgeorge/microservices-single-swagger,我遇到的问题是我知道我的swagger文档的端点但是为了直接通过我的浏览器访问它,我需要提供用户名和密码。我想以编程方式执行此操作以避免出现以下错误。
作为配置提供后,url 带有附加的访问凭据:
Errors
Hide
Fetch errorFailed to execute 'fetch' on 'Window': Request cannot be constructed from a URL that includes credentials: https://username:password@my-host/v2/api-docs https://username:password@my-host/v2/api-docs
Fetch errorPossible cross-origin (CORS) issue? The URL origin (https://my-host) does not match the page (http://localhost:8080). Check the server returns the correct 'Access-Control-Allow-*' headers.
【问题讨论】:
标签: authentication swagger springfox