🚀 Big News:Socket Has Acquired Secure Annex.Learn More
Socket
Book a DemoSign in
Socket

@evo/fetch-io

Package Overview
Dependencies
Maintainers
12
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@evo/fetch-io - npm Package Compare versions

Comparing version
2.1.2
to
2.1.4
+10
-3
dist/utils.js

@@ -232,8 +232,15 @@ 'use strict';

options = applyOpts(getDefaultOptions(method), opts);
_context2.next = 6;
if (CSRF_TOKEN_HEADER in options.headers) {
_context2.next = 8;
break;
}
_context2.next = 7;
return (0, _userInfo.getMyCSRF)();
case 6:
case 7:
options.headers[CSRF_TOKEN_HEADER] = _context2.sent;
case 8:
options.headers[PROMUSER_HEADER] = user.id;

@@ -243,3 +250,3 @@ options.body = formatBody(params, opts);

case 10:
case 11:
case 'end':

@@ -246,0 +253,0 @@ return _context2.stop();

{
"name": "@evo/fetch-io",
"version": "2.1.2",
"version": "2.1.4",
"description": "",

@@ -5,0 +5,0 @@ "repository": {

@@ -150,3 +150,5 @@ import { isAbsolute } from '@evo/prom-utils/lib/url';

const options = applyOpts(getDefaultOptions(method), opts);
options.headers[CSRF_TOKEN_HEADER] = await getMyCSRF();
if (!(CSRF_TOKEN_HEADER in options.headers)) {
options.headers[CSRF_TOKEN_HEADER] = await getMyCSRF();
}
options.headers[PROMUSER_HEADER] = user.id;

@@ -153,0 +155,0 @@ options.body = formatBody(params, opts);