- Service Worker Development Cookbook
- Sean Amarasinghe
- 291字
- 2021-07-14 10:05:18
Setting up SSL for Windows
Service workers are designed to run only across HTTPS, so in order for us to test our code, we need our web pages to be delivered across HTTPS. In this recipe, we will cover getting your site setup with SSL support for Windows.
Getting ready
This recipe assumes you run Windows 7 or higher with Internet Information Service (IIS) enabled.
How to do it...
Follow these instructions to enable SSL:
- First, open IIS; you can do this by running the following command inside the command line:
Inetmgr
- Select the server node in the tree view and double-click the Server Certificates feature in the list view, as shown:
- Click on the Create Self-Signed Certificate... link in the Actions pane.
- Enter a meaningful name for the new certificate and click OK.
This will generate a self-signed certificate, which is marked for Server Authentication use, meaning it uses a server-side certificate for authenticating the identity of the server and also for HTTP SSL encryption.
In order to create an SSL binding, we have to select a site in the tree view and then, in the Actions pane, click Bindings.... This will bring up the bindings editor that manages bindings for your website, which include create, edit, and delete. Now, to add your new SSL binding to the site, click Add....
- Port 80 is the default setting for a new binding for HTTP. We can select https in the Type drop-down list. Select the self-signed certificate we created in the previous section from the SSL Certificate drop-down list, and then click OK.
- Now we have a new SSL binding on our site and all that remains is to make sure that it works.
- Click Continue to this website to proceed.
- 深入淺出Electron:原理、工程與實踐
- iOS 9 Game Development Essentials
- Java深入解析:透析Java本質的36個話題
- Python貝葉斯分析(第2版)
- 微信小程序開發解析
- 移動界面(Web/App)Photoshop UI設計十全大補
- 蘋果的產品設計之道:創建優秀產品、服務和用戶體驗的七個原則
- Learning AngularJS for .NET Developers
- 新一代SDN:VMware NSX 網絡原理與實踐
- Learning Docker Networking
- Mockito Essentials
- Using Yocto Project with BeagleBone Black
- SQL Server 2008實用教程(第3版)
- 數據結構與算法詳解
- 亮劍Java Web項目開發案例導航