问题描述
1、用ip访问页面,通过ajax发起http请求idea控制台报错:
Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level.
java.lang.IllegalArgumentException: Invalid character found in method name. HTTP method names must be tokens
2、浏览器报错,Failed to load resource: net::ERR_SSL_PROTOCOL_ERROR
找不到资源
解决方法
这个问题,就是由是https的请求了http导致的,去掉html页面中的如下meta标签内容即可,该标签是将页内的请求升级为https:
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">