swagger servers
时间: 2023-11-16 10:49:13 浏览: 40
swagger的servers属性是用来指定API服务的基本URL的。在swagger文档中,servers属性定义了API的根URL,以便客户端可以正确构建API请求。在你提供的引用中,servers属性可能会导致在测试环境中出现问题,因为它会添加一个额外的服务器选项。这个问题可以通过在使用swagger中间件之前移除X-Forwarded-Host请求头来解决。这样做可以避免servers属性的出现,但可能不是最优雅的解决方案。
相关推荐
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)