Verified Commit a5786236 authored by Booteille's avatar Booteille

Don't force HTTPS for .onion domains

parent 01595910
......@@ -6,6 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [0.7.3] - 2019-04-09
### Added
- Updated uMatrix recipe to support known Invidious instances
### Fixed
- Don't force HTTPS for .onion domains
## [0.7.2] - 2019-04-07
### Fixed
- Remove forgotten console.log()
......
......@@ -28,7 +28,8 @@ const invidition = async (r) => {
if (url.hostname.indexOf(instance.hostname) === -1) {
queryChanged = true;
url.hostname = instance.hostname;
url.protocol = 'https'; // Force HTTPS
// Force HTTP if instance is using Tor. Otherwise, force HTTPS.
url.protocol = _.endsWith(url.hostname, '.onion') ? 'http' : 'https';
}
if (_.startsWith(url.pathname, '/embed') || _.startsWith(url.pathname, '/watch')) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment