@tryghost/admin-api
Advanced tools
+11
-2
@@ -44,2 +44,3 @@ /* eslint-disable no-restricted-syntax */ | ||
| * @param {String|Boolean} options.version - a version string like v3.2, v4.1, v5.8 or boolean value identifying presence of Accept-Version header | ||
| * @param {String|Boolean} [options.userAgent] - flag controlling if the 'User-Agent' header should be sent with a request | ||
| * @param {Function} [options.makeRequest] | ||
@@ -56,2 +57,3 @@ * @param {Function} [options.generateToken] | ||
| ghostPath: 'ghost', | ||
| userAgent: true, | ||
| generateToken: token, | ||
@@ -431,6 +433,13 @@ makeRequest({url, method, data, params = {}, headers = {}}) { | ||
| const ghostHeaders = { | ||
| Authorization: authorizationHeader, | ||
| 'User-Agent': `GhostAdminSDK/${packageVersion}` | ||
| Authorization: authorizationHeader | ||
| }; | ||
| if (config.userAgent) { | ||
| if (typeof config.userAgent === 'boolean') { | ||
| ghostHeaders['User-Agent'] = `GhostAdminSDK/${packageVersion}`; | ||
| } else { | ||
| headers['User-Agent'] = config.userAgent; | ||
| } | ||
| } | ||
| if (config.acceptVersionHeader) { | ||
@@ -437,0 +446,0 @@ ghostHeaders['Accept-Version'] = config.acceptVersionHeader; |
+2
-2
| { | ||
| "name": "@tryghost/admin-api", | ||
| "version": "1.12.2", | ||
| "version": "1.13.0", | ||
| "repository": "https://github.com/TryGhost/SDK/tree/master/packages/admin-api", | ||
@@ -35,3 +35,3 @@ "author": "Ghost Foundation", | ||
| }, | ||
| "gitHead": "ce790579ad1f191b24c05733d8a0a56f0b9f96d2" | ||
| "gitHead": "a1f560e288bf67886483f9b5d483eecd749c09cc" | ||
| } |
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
18951
1.94%425
1.92%