jsir 2.5.2 → 2.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/deps/server.js +2 -8
  2. package/package.json +1 -1
package/deps/server.js CHANGED
@@ -32,13 +32,7 @@ function createSign() {
32
32
  }
33
33
  }
34
34
 
35
- async function process(routeKey, req, res, params, clientIp) {
36
- if (!clientIp.endsWith(":" + setting.selfRoom.selfNode)) {
37
- res.writeHead(403, {'Content-Type': 'text/plain'});
38
- res.end('Forbidden: Not Allowed');
39
- return;
40
- }
41
-
35
+ async function process(routeKey, req, res, params) {
42
36
  let router = routes[routeKey]
43
37
  if (router) {
44
38
  if ("get /" !== routeKey && !router.isApi) {
@@ -107,7 +101,7 @@ async function createServer(port) {
107
101
  const routeKey = `${method} ${url}`;
108
102
  let time = Date.now();
109
103
  try {
110
- await process(routeKey, req, res, params, clientIp);
104
+ await process(routeKey, req, res, params);
111
105
  } finally {
112
106
  debug(`Process cost ${Date.now() - time}ms for ${routeKey} from ${clientIp}`);
113
107
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jsir",
3
- "version": "2.5.2",
3
+ "version": "2.5.3",
4
4
  "description": "JavaScript Script Management Tool",
5
5
  "main": "index.js",
6
6
  "scripts": {