【问题标题】:SSL certificates installation raises XMLHttpRequest cannot load exceptionSSL 证书安装引发 XMLHttpRequest 无法加载异常
【发布时间】:2023-04-02 21:33:02
【问题描述】:

问题:

我有 2 个网站具有相同的 IP 地址(一个域和一个子域),并且每个网站都有一个 SSL 证书。该域是一个 word-press 站点,而子域是一个 ruby​​ on rails 应用程序。子域已安装证书并且可以正常工作,但是当我尝试为主域添加第二个证书时,它可以工作,但它会阻止访问子域。

在网络浏览器检查页面中显示此错误:

“XMLHttpRequest 无法加载https://giladparking.com/wp-content/plugins/wp-slimstat/wp-slimstat-js.php。请求的资源上不存在“Access-Control-Allow-Origin”标头。因此,不允许访问 Origin 'https://monthly.giladparking.com'。”

我尝试过的:

我已关注this tutorial 以允许 SNI 支持,除了前面提到的问题外,它似乎可以工作。

我还查看了this post,它解释了您不能跨域进行 XMLHTTPRequests。但是这个问题只有在两个证书都有效时才会出现。

【问题讨论】:

    标签: ssl xmlhttprequest ssl-certificate sni


    【解决方案1】:

    “XMLHttpRequest 无法加载https://giladparking.com/wp-content/plugins/wp-slimstat/wp-slimstat-js.php....

    此站点的证书对monthly.giladparking.com 和www.monthly.giladparking.com 有效,但对giladparking.com 无效。这就是为什么对该站点的任何访问都会因证书错误而失败。此问题不限于 XMLHTTPRequests。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-08-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-08-01
      • 2016-08-30
      • 2013-10-10
      • 1970-01-01
      相关资源
      最近更新 更多