This repository was archived by the owner on Aug 14, 2019. It is now read-only.
Remove forced ssl upgrade for localhost http requests#859
Merged
vvisigoth merged 2 commits intourbit:release-candidatefrom Oct 16, 2018
Merged
Remove forced ssl upgrade for localhost http requests#859vvisigoth merged 2 commits intourbit:release-candidatefrom
vvisigoth merged 2 commits intourbit:release-candidatefrom
Conversation
Fang-
reviewed
Oct 12, 2018
Fang-
reviewed
Oct 12, 2018
Member
Fang-
left a comment
There was a problem hiding this comment.
That was fast! I said I'd insta-merge, but I have a question about your specific implementation, maybe it can be simplified further.
Also, @cgyarvin, you put the forced-secure in like 2 years ago. If you can recall a good reason for it, speak up now.
Now that the uri parsing is not being modified by the localhost forced ssl upgrade, this cook is not needed.
Contributor
|
I've assumed that this was related to the way in which user-agents treat |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I've been playing around trying to glue urbit and IPFS together. For my first iteration, I tried to
+curlmy local IPFS API from the Dojo. Becausego-ipfsdoesn't implement HTTPS, I made sure to do a+curl "http://localhost:5001...", but I was still getting an ssl related error:Talking to @Fang- at the last meetup, he reassured me this should not be happening, and specifying "http" should do a regular non-ssl request. I dug in a bit and found the issue: in the definition for
++ aurithere is a conditional to check if this is a localhost request (using++ hoke), and if so, it forces it to use SSL.This PR removes this forced upgrade, so i can specify either an http or https request to localhost.
There might be a reason for this check, but I couldn't find one. I did some git spelunking and found that this was added in commit 2c3c4c8 , so maybe @cgyarvin knows if this is still needed or not.
Also, I don't fully grok the implications of creating this "iron gate" here; I cargo-culted from a similar-looking
++ aurfdefinition above and it worked :)