Socket
Socket
Sign inDemoInstall

list-fetch

Package Overview
Dependencies
218
Maintainers
1
Versions
169
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 28.0.1 to 28.0.2

14

index.js

@@ -257,3 +257,5 @@ module.exports = async function makeBTFetch (opts = {}) {

}
return sendTheData(signal, {status: 200, headers: {'X-Link': `bt://${mid.mainHost}${mid.mainPath}`, 'Link': `<bt://${mid.mainHost}${mid.mainPath}>; rel="canonical"`, 'Content-Length': String(torrentData.length), 'Content-Type': mainRes, ...useHeaders}, body: mainReq ? `<html><head><title>${mid.mainLink}</title></head><body><div>${JSON.stringify(torrentData.saved)}</div></body></html>` : JSON.stringify(torrentData.saved)})
useHeaders['X-Link'] = `bt://${torrentData.address || torrentData.infohash}${mid.mainPath}`
useHeaders['Link'] = `<${useHeaders['X-Link']}>; rel="canonical"`
return sendTheData(signal, {status: 200, headers: {'Content-Length': String(torrentData.length), 'Content-Type': mainRes, ...useHeaders}, body: mainReq ? `<html><head><title>${mid.mainLink}</title></head><body><div>${JSON.stringify(torrentData.saved)}</div></body></html>` : JSON.stringify(torrentData.saved)})
} else {

@@ -272,3 +274,5 @@ const useOpts = {

}
return sendTheData(signal, { status: 200, headers: { 'X-Link': `bt://${mid.mainHost}${mid.mainPath}`, 'Link': `<bt://${mid.mainHost}${mid.mainPath}>; rel="canonical"`, 'Content-Length': String(torrentData.length), 'Content-Type': mainRes, ...useHeaders }, body: mainReq ? `<html><head><title>${mid.mainLink}</title></head><body><div>${JSON.stringify(torrentData.saved)}</div></body></html>` : JSON.stringify(torrentData.saved) })
useHeaders['X-Link'] = `bt://${torrentData.address || torrentData.infohash}${mid.mainPath}`
useHeaders['Link'] = `<${useHeaders['X-Link']}>; rel="canonical"`
return sendTheData(signal, { status: 200, headers: { 'Content-Length': String(torrentData.length), 'Content-Type': mainRes, ...useHeaders }, body: mainReq ? `<html><head><title>${mid.mainLink}</title></head><body><div>${JSON.stringify(torrentData.saved)}</div></body></html>` : JSON.stringify(torrentData.saved) })
}

@@ -296,7 +300,9 @@ }

const useHead = {}
for (const test of ['id', 'path', 'infohash', 'dir', 'name', 'sequence', 'pair', 'address']) {
for (const test of ['id', 'path', 'infohash', 'dir', 'name', 'sequence', 'pair', 'address', 'secret']) {
if (torrentData[test]) {
useHead[test] = torrentData[test]
useHead['X-' + test.charAt(0).toUpperCase() + test.slice(1)] = torrentData[test]
}
}
useHead['X-Link'] = `bt://${torrentData.address || torrentData.infohash || torrentData.id}${mid.mainPath}`
useHead['Link'] = `<${useHead['X-Link']}>; rel="canonical"`

@@ -303,0 +309,0 @@ return sendTheData(signal, {status: 200, headers: {'Content-Type': mainRes, ...useHead}, body: mainReq ? `<html><head><title>${mid.mainLink}</title></head><body><div>${JSON.stringify(torrentData)}</div></body></html>` : JSON.stringify(torrentData)})

{
"name": "list-fetch",
"version": "28.0.1",
"version": "28.0.2",
"description": "coming soon",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc