Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit 1108c81

Browse files
fix: Proper request headers for add url
1 parent 9cdb0a2 commit 1108c81

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/index.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,10 @@ function IpfsAPI (host_or_multiaddr, port) {
6565
}
6666

6767
if (typeof files === 'string' && files.startsWith('http')) {
68-
files = request(files)
68+
files = request.get({
69+
url: files,
70+
withCredentials: false
71+
})
6972
}
7073

7174
return requestAPI('add', null, opts, files, cb)

0 commit comments

Comments
 (0)