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

fix: Enforce http protocol for all requests #123

Closed

Conversation

dignifiedquire
Copy link
Contributor

Closes #66

@fbaiodias
Copy link
Contributor

👍

@daviddias
Copy link
Contributor

Interesting, what happens if it is https? Why do we need to enforce?

@victorb
Copy link
Contributor

victorb commented Nov 16, 2015

Hm, this would block anyone from using js-ipfs-api on an https site, which, anyways is not working because the API is only served via http. How can we solve this? Should we solve this?

@dignifiedquire
Copy link
Contributor Author

We are already enforcing http now in nodejs, but for some reason in the browser it's not picking that up from the url. We should make this an option in the long run, but for now this at least brings the browser and node on equal footing

@daviddias
Copy link
Contributor

As discussed on IRC. Let's add this as an option to the creation of ipfsAPI :)

@jbenet
Copy link
Contributor

jbenet commented Nov 19, 2015

Users should be able to put the exact endpoint directly:

Api('http://localhost:5001/v0/api')
Api('https://user:pass@host/api')
Api('//meh/API')
Api('/ip4/1.2.2.4/tcp/5001/https/v0/api')

(We need to add support to multiaddr for DNS, http paths, and more)

This is why traditional 'host', port params suck. Info is lost and not
passed through.
On Tue, Nov 17, 2015 at 15:21 David Dias [email protected] wrote:

As discussed on IRC. Let's add this as an option to the creation of
ipfsAPI :)


Reply to this email directly or view it on GitHub
#123 (comment).

@dignifiedquire
Copy link
Contributor Author

Closing in favor of #67

@dignifiedquire dignifiedquire deleted the explicit-protocol branch November 21, 2015 21:16
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.

5 participants