Socket
Socket
Sign inDemoInstall

node-tool-utils

Package Overview
Dependencies
40
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.4.0 to 1.4.1

9

CHANGELOG.md

@@ -0,1 +1,10 @@

## [1.4.1](https://github.com/hubcarl/node-tool-utils/compare/1.4.0...1.4.1) (2019-10-22)
### Bug Fixes
* cors not get request, will trigger options request and valid custom header ([25bb949](https://github.com/hubcarl/node-tool-utils/commit/25bb949))
# [1.4.0](https://github.com/hubcarl/node-tool-utils/compare/1.3.0...1.4.0) (2019-10-21)

@@ -2,0 +11,0 @@

@@ -76,2 +76,12 @@ 'use strict';

response.setHeader('Access-Control-Allow-Origin', '*');
response.setHeader("Access-Control-Allow-Credentials", "true");
response.setHeader("Access-Control-Allow-Methods", "*");
response.setHeader("Access-Control-Expose-Headers", "*");
// 跨域导致的自定义Header问题
response.setHeader("Access-Control-Allow-Headers", "*");
// 跨域非 GET 请求会触发 OPTIONS 请求
if (request.method === 'OPTIONS') {
response.statusCode = 200;
return;
}

@@ -78,0 +88,0 @@ // image

2

package.json
{
"name": "node-tool-utils",
"version": "1.4.0",
"version": "1.4.1",
"description": "node cross-platform tool library",

@@ -5,0 +5,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc