directus-transport-safe-run-middleware
Advanced tools
Comparing version 1.0.22 to 1.0.23
@@ -15,8 +15,8 @@ "use strict"; | ||
method, | ||
body: '', | ||
url: this.url + path, | ||
body: data, | ||
headers: { | ||
remoteAddress: '127.0.0.1', | ||
origin: '127.0.0.1', | ||
'content-type': 'application/json', | ||
'content-type': 'text/plain', | ||
'transfer-encoding': 'identity' | ||
@@ -26,2 +26,7 @@ }, | ||
}; | ||
if (data) { | ||
params.body = data; | ||
if (typeof data === 'object') | ||
params.headers['content-type'] = 'application/json'; | ||
} | ||
if (options.params) | ||
@@ -28,0 +33,0 @@ params.query = options.params; |
{ | ||
"name": "directus-transport-safe-run-middleware", | ||
"version": "1.0.22", | ||
"version": "1.0.23", | ||
"description": "A transport for the Directus JavaScript SDK which calls the express endpoints on the same server.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
6689
104