Java知识分享网 - 轻松学习从此开始!    

Java知识分享网

Java1234官方群25:java1234官方群17
Java1234官方群25:838462530
        
SpringBoot+SpringSecurity+Vue+ElementPlus权限系统实战课程 震撼发布        

最新Java全栈就业实战课程(免费)

springcloud分布式电商秒杀实战课程

IDEA永久激活

66套java实战课程无套路领取

锋哥开始收Java学员啦!

Python学习路线图

锋哥开始收Java学员啦!

Mastering Node.js PDF 下载


分享到:
时间:2024-07-04 10:29来源:http://www.java1234.com 作者:转载  侵权举报
Mastering Node.js
失效链接处理
Mastering Node.js PDF 下载

 
 
 
相关截图:
 

主要内容:

Installing a real SSL certificate
In order to move a secure application out of a development environment and into an
Internet-exposed environment a real certificate will need to be purchased. The prices
of these certificates has been dropping year by year, and it should be easy to find
reasonably priced providers of certificates with a high-enough level of security. Some
providers even offer free person-use certificates.
Setting up a professional cert simply requires changing the HTTPS options we
introduced above. Different providers will have different processes and filenames.
Typically you will need to download or otherwise receive from your provider
a private .key file, your signed domain certificate .crt file, and a bundle describing
certificate chains:
var options = {
key : fs.readFileSync("mysite.key"),
cert : fs.readFileSync("mysite.com.crt"),
ca : [ fs.readFileSync("gd_bundle.crt") ]
};
It is important to note that the ca parameter must be sent as an array, even if the
bundle of certificates has been concatenated into one file.
 
The request object
HTTP request and response messages are similar, consisting of:
• A status line, which for a request would resemble GET/index.html
HTTP/1.1, and for a response would resemble HTTP/1.1 200 OK
• Zero or more headers, which in a request might include Accept-Charset:
UTF-8 or From: user@server.com, and in responses might resemble
Content-Type: text/html and Content-Length: 1024
• A message body, which for a response might be an HTML page, and for
a POST request might be some form data
We've seen how HTTP server interfaces in Node are expected to expose a request
handler, and how this handler will be passed some form of a request and response
object, each of which implement a readable or writable stream.
 

 
 
------分隔线----------------------------

锋哥公众号


锋哥微信


关注公众号
【Java资料站】
回复 666
获取 
66套java
从菜鸡到大神
项目实战课程

锋哥推荐