Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

pass the config protocol to http requests #609

Merged
merged 1 commit into from
Oct 17, 2017

Conversation

jfmherokiller
Copy link
Contributor

While calling request(config.protocol) sets the right http protocol api to use it does not correctly pass the protocol information to node_modules/stream-http.

If the page is loaded over https and the daemon is located on http it fails to send the api request to the deamon.

This is because the code believes the daemon is located at https://127.0.0.1:5001/ when it is actually located at http://127.0.0.1:5001/.

Without this change the code throws an unrecoverable error and doesnt provide the user with information to fix the issue, with the change it still throws an error but it also lets the user resolve the issue by clicking the mixed content shield shield image and allowing insecure content.

Signed-off-by: noah the goodra <peterpan0413@live.com>
@daviddias daviddias merged commit 38d7289 into ipfs-inactive:master Oct 17, 2017
@ghost ghost removed the ready label Oct 17, 2017
@daviddias
Copy link
Contributor

Thank you @jfmherokiller :)

@jfmherokiller
Copy link
Contributor Author

has this change been pushed out to npm/unpkg yet?

@daviddias
Copy link
Contributor

@jfmherokiller yep, should be there since 14.3.6 -> https://github.com/ipfs/js-ipfs-api/commits/master

@jfmherokiller jfmherokiller deleted the patch-1 branch October 19, 2017 14:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants