托管没有ssl证书的blazor Web应用 [英] Hosting a blazor web app without ssl certificate

查看:77
本文介绍了托管没有ssl证书的blazor Web应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用Blazor制作了一个Web应用程序,现在我想使用一个免费的.ml域托管在我的服务器中.但是service-worker.js不能在没有安全连接的情况下运行.这是一个免费域名,所以我不想支付证书费用.

I have made a web app using Blazor and now i want to host in my server with a free .ml domain. But service-worker.js not running without a secure connection. It is a free domain so i don't want to pay for a certificate.

使用SSL选项.我在网上找不到有关此信息.我可以强制使用http吗?

Use SSL option in the project property is unchecked in all projects. I couldn't find any information about this online. Can i force to use http ?

谢谢

SSL错误

推荐答案

据我所知,Service worker需要https(除了本地主机)才能工作.只要我们在客户端和服务器端之间正确建立了证书信任关系(用于交换证书的公钥),那么第三方证书和自签名证书都可以. https://developers.google.com/web/fundamentals/primers/service-workers/
对于免费的SSL证书,
https://geekflare.com/free-ssl-tls-certificate/
对于自签名证书,
https://docs.microsoft.com/en-us/powershell/module/pkiclient/new-selfsignedcertificate?view = win10-ps
这是使用自签名证书的示例.
可以将服务人员与具有签名的证书?
随时让我知道是否有什么可以帮助您的.

As far as I know, Service worker requires https except the localhost to work. Both the third-party certificate and the self-signed certificate is ok as long as we established the certificate trust relationship between the client-side and the server-side properly(for exchanging the public key of certificate).
https://developers.google.com/web/fundamentals/primers/service-workers/
For free SSL certificate,
https://geekflare.com/free-ssl-tls-certificate/
For self-signed certificate,
https://docs.microsoft.com/en-us/powershell/module/pkiclient/new-selfsignedcertificate?view=win10-ps
Here is an example of using a self-signed certificate.
Can you use a service worker with a self-signed certificate?
Feel free to let me know if there is anything I can help with.

这篇关于托管没有ssl证书的blazor Web应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆