New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

nokitjs

Package Overview
Dependencies
Maintainers
1
Versions
119
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nokitjs - npm Package Compare versions

Comparing version 1.13.9 to 1.14.0

3

CHANGELOG.md

@@ -0,1 +1,4 @@

### 1.14.0
1. 添加 https 支持
### 1.13.9

@@ -2,0 +5,0 @@ 1. 调整 500 错误页显示

/* global process */
var http = require('http');
var https = require('https');
var fs = require('fs');

@@ -495,7 +496,7 @@ var util = require("util");

/**
* 创建 http server 并处理
* 创建请求监听函数
**/
Server.prototype._createServer = function () {
Server.prototype._createListener = function () {
var self = this;
self.httpServer = http.createServer(function (req, res) {
return (function (req, res) {
var context = new Context(self, req, res);

@@ -530,2 +531,34 @@ //设置 server 头信息

});
};
/**
* 生成 https 选项
**/
Server.prototype._getHttpsOptions = function (httpsConfigs) {
var self = this;
var httpsOptions = {};
if (httpsConfigs.key) {
httpsOptions.key = fs.readFileSync(self.resolvePath(httpsConfigs.key));
}
if (httpsConfigs.cert) {
httpsOptions.cert = fs.readFileSync(self.resolvePath(httpsConfigs.cert));
}
if (httpsConfigs.pfx) {
httpsOptions.pfx = fs.readFileSync(self.resolvePath(httpsConfigs.pfx));
}
return httpsOptions;
};
/**
* 创建 http server 并处理
**/
Server.prototype._createServer = function () {
var self = this;
if (!self.configs.https) {
self.httpServer = http.createServer(self._createListener());
} else {
var httpsOptions = self._getHttpsOptions(self.configs.https);
self.httpServer = https.createServer(httpsOptions, self._createListener());
}
//设定初始状态
self.httpServer.started = false;

@@ -532,0 +565,0 @@ //close 事件

2

lib/resources/nsp-client.js
/**
* Nokit - A Web development framework
* @version v1.13.9
* @version v1.14.0
* @link http://nokit.org

@@ -5,0 +5,0 @@ * @license MIT

{
"name": "nokitjs",
"rawName": "Nokit",
"version": "1.13.9",
"version": "1.14.0",
"description": "A Web development framework",

@@ -6,0 +6,0 @@ "main": "./lib/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc