Home > front end >  Through plug-ins in the HTTPS page launched a HTTP request
Through plug-ins in the HTTPS page launched a HTTP request

Time:12-13

As title, Google browser, grease monkey plug-in, local browser Settings - disable - web - security - user - data - dir=C: \ MyChromeDevUserData
Cross domain no problem, the same ajax request, in the HTTP pages that can be sent out, could not found in the HTTPS
HTTPS pages dynamically adds a mate tag
The code below
Var oMeta=document. The createElement method (" meta ");
OMeta. HttpEquiv='Content - Security - the Policy;
OMeta. The content='upgrade - insecure - requests;
Document. GetElementsByTagName (' head '). The appendChild (oMeta);
Request to upgrade, the HTTP request upgraded to HTTPS
But I this request then become HTTPS to request timeout

The original url is like this: http://xxx.xxx.com/
The updated url is like this: https://xxx.xxx.com/
After the request error: Failed to load the resource: net: : ERR_TIMED_OUT

CodePudding user response:

Well, in order to solve the problem of platform authentication code, changing the code platform support HTTPS interfaces

CodePudding user response:

First determine the server support HTTPS is not a simple add url s must open server support
  •  Tags:  
  • Ajax
  • Related