HTTPS协议经过SpringMVC重定向后变成HTTP协议问题&解决
问题详情
1.请求的接口
https://xxx.xxx.com/deleteModuleDependency.json
2.Spring接口代码
@RequestMapping(value = "deleteModuleDependency.json")
public ModelAndView deleteModuleDependency(HttpServletResponse response, HttpServletRequest request, @ModelAttribute ModuleDependencyBean moduleDependency) {
moduleDependencyService.deleteModuleDependencyById(moduleDependency.getId());
return new ModelAndView("redirect:/moduleinfo/modulelist.html");
}
3.返回控制台报错
返回的页面路径是:http://xxx.xxx.com/moduleinfo/modulelist.html
Mixed Content: The page at 'https://xxx.xxx.com/moduledependency/moduledependency-list.html?name=DishSKU' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http: