Enable running using http
This means that by adding PHANPY_SCHEME=http to the file ".env" phanpy will use http instead of https to connect to remote instances.
This is useful to test local versions of various Fediverse applications. These can be created following the instructions on
https://funfedi.dev/quickstart/#running-an-application-from-the-fediverse-pasture
Sorry for the very late response. I think I've had a thought about this at some point, briefly discussed with some folks (many months ago), got distracted and worked on other things. But I do vaguely remember this 🙈:
- Using env var config is not the right solution. In the end, http or https depends on the domain that you're trying to log in, not by the client built with this specific env var config that assumes all domains to be http://
- A better solution is allowing users to enter "http://mastodon.domain". Now the login page only allow domain without protocol. Even if you accidentally put in the scheme, the code will auto-strip it away. So for this case, we don't strip them if there's "http://". And then we need to store this somewhere (maybe part of
instanceskey in localStorage, and hack a__insecure__key or the more generic__scheme__=httpkey in the Instance object?).
What do you think?
What do you think?
I think it's complicated. The option of allowing inputting "http://mastodon.domain" has the charm that I will not need to run my own phanpy installation locally, but can use the one at https://phanpy.social/. So I'm all for it.
However, I do not possess sufficient expertise to know if this will have unintended side effects.
Also note: While I use this change, I don't use it often. As you can see by this pull request sitting around for a year and a half.
I don't think you can talk to http urls from https pages?
In any case, I would like it to be an option - and perhaps the better solution indeed would be to allow the user to enter the scheme. Aside from local development needs, it would allow to use it in overlay networks (tor, i2p, yggdrasil, etc), where https is neither guaranteed nor necessary, as a bonus.