当在本地工作时,我能够访问swaggerui页面,而不会因为HTTP而出现问题。当使用HTTPS ALB部署到AWS时,我看到它试图加载一些HTTP内容;这些内容当然会被浏览器阻止。错误:
Mixed Content: The page at 'https://alb.com/alert/docs/swagger-ui.html' was loaded over HTTPS, butrequested an insecure XMLH
我知道如何禁用swagger for production -我只需要在configuration类中添加注释@Profile("!prod")
public class SwaggerConfig { result of adding annotation但结果是,swagger-ui.html在浏览器中仍然可用,只是它是空的。