我使用angularJS 1.7创建了一个hello世界,并使用http-server节点模块运行了网页。 在使用$ http服务的控制器中,将进行CORS调用。
CORS调用正在尝试与API建立TLS 1.2相互认证。服务器和客户端上都安装了证书。使用Chrome测试时,初始握手失败,但是会弹出一个弹出窗口以选择证书。一旦选择了证书,握手便会成功并检索数据。
证书是在根级别添加的自签名。
但是在IE11中同样失败。 “ Access-Control-Allow-Origin”设置为客户端的IP。
下面是鲨鱼原木。 客户端发送你好 服务器使用服务器问候和证书进行响应。
但是服务器将警报发送到“关闭通知”
响应中的标记为“重置”
下面是html代码
<!DOCTYPE html>
<html>
<head>
<script src="angular.js"></script>
</head>
<body>
<div ng-app="myApp" ng-controller="myCtrl">
<p>Response log:</p>
<h1>{{myWelcome}}</h1>
<p> Status </p>
<h3> {{pstatus}} </h3>
</div>
<script>
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope, $http) {
$http({
method: "POST",
url: 'https://serveraddress:portno/myrestapi/methodcall/',
headers: {
'Content-Type': 'application/json'
}
}).then(function(response) {
$scope.myWelcome = response.data;
}).catch(function(error){
$scope.myWelcome= error;
});
我还没有找到类似的文章
IE is not sending Client certificate in TLS mutual authentication
但是它不能解决问题。
有人建议为什么握手越来越紧密吗?任何输入? IE11支持吗?
谢谢。