Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add HTTPS when calling ipfs API #626

Merged
merged 1 commit into from
Mar 3, 2018
Merged

Add HTTPS when calling ipfs API #626

merged 1 commit into from
Mar 3, 2018

Conversation

Sh4d1
Copy link
Contributor

@Sh4d1 Sh4d1 commented Jan 31, 2018

Hey,

I saw that when NODE_ENV is set to production, even if the site is on https, the call is made over http. Thsi PR fixes it, taking the protocol of the site to send the requests.

See #625

Copy link
Member

@hacdias hacdias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 😄 Thanks!

@daviddias
Copy link
Member

@hacdias did you test this with localhost?

@hacdias
Copy link
Member

hacdias commented Feb 1, 2018

@diasdavid yeah, it defaults to HTTP. Although, there could be a problem if someone used HTTPS on localhost. But that's a matter of removing the first condition.

@Sh4d1
Copy link
Contributor Author

Sh4d1 commented Feb 1, 2018

@diasdavid @hacdias also, I'm not sure it is a web UI issue though but it is not working.
I have a docker image of go-ipfs running on my server, and traefik as a reverse proxy. I expose the port 5001, and it is also accessible via HTTPS on ipfs.ptrk.io. When I try to load a request like API/v0/version, it loads the content but the request is not finished (still loading), same when I curl it. When I use the port 5001, it's all good. So on the WebUI, the requests made to https://ipfs.ptrk.io, are taking a long time, and when they are finished, nothing appears on the UI.

@Sh4d1
Copy link
Contributor Author

Sh4d1 commented Feb 1, 2018

I'm pretty sure it is linked to this

@hacdias hacdias merged commit 6d8bacc into ipfs:master Mar 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants