我有一个请求处理程序中设置这样的:Wakanda服务器CORS与HTTPS连接
httpServer.addRequestHandler("^/send-contact-message", "./rest-extensions/contact-messages.js", "sendContactMessage");
我已经建立了这样的CORS:
<cors enabled="true">
<domain name="imagesreimagined.com" methods="post"/>
</cors>
我的服务器建立安全连接( HTTPS)设置为Accept only HTTPS from remote & allow HTTP and HTTPS from localhost
。如果我从一个形式发送一个请求与action="https://imagesreimagined.store/send-contact-message"
,我得在浏览器中的错误,指出:
的XMLHttpRequest无法加载https://imagesreimagined.store/send-contact-message。 Access-Control-Allow-Origin不允许原产地http://imagesreimagined.com。
如果我将我的服务器的安全连接(HTTPS)设置为Accept both HTTP and HTTPS connections
并将表单操作更改为http,则它可以工作。但是,我需要所有远程连接都是https。
我也尝试了与443端口的CORS并得到相同的错误。
<cors enabled="true">
<domain name="imagesreimagined.com:443” methods="post"/>
</cors>
调用Wakanda服务器的服务器不是SSL,如果这有所帮助。
你的网址是'https:// imagesreimagined.store',为什么要在CORS中添加'imagesreimagined.com'而不是'imagesreimagined.store'? – Yann
@Yann'imagesreimagined.store'是运行Wakanda服务器的服务器的域名。 'imagesreimagined.com'是访问Wakanda服务器的非Wakanda网站的域名。 –
您是否精确定义了