mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-09 00:40:11 +01:00
Enforce https uniformly in all http links
This commit is contained in:
parent
756f4a2363
commit
128b19e010
@ -35,6 +35,12 @@ def enforce_https(domain):
|
|||||||
http_warnings = [
|
http_warnings = [
|
||||||
(re.compile(r'.*/$'),
|
(re.compile(r'.*/$'),
|
||||||
"HTTP links shouldn't end with a slash"),
|
"HTTP links shouldn't end with a slash"),
|
||||||
|
enforce_https('github.com'),
|
||||||
|
enforce_https('gitorious.org'),
|
||||||
|
enforce_https('apache.org'),
|
||||||
|
enforce_https('google.com'),
|
||||||
|
enforce_https('svn.code.sf.net'),
|
||||||
|
enforce_https('googlecode.com'),
|
||||||
# TODO enable in August 2015, when Google Code goes read-only
|
# TODO enable in August 2015, when Google Code goes read-only
|
||||||
# (re.compile(r'.*://code\.google\.com/.*'),
|
# (re.compile(r'.*://code\.google\.com/.*'),
|
||||||
# "code.google.com will be soon switching down, perhaps the project moved to github.com?"),
|
# "code.google.com will be soon switching down, perhaps the project moved to github.com?"),
|
||||||
@ -46,12 +52,6 @@ regex_warnings = {
|
|||||||
'Source Code': http_warnings + [
|
'Source Code': http_warnings + [
|
||||||
],
|
],
|
||||||
'Repo': [
|
'Repo': [
|
||||||
enforce_https('github.com'),
|
|
||||||
enforce_https('gitorious.org'),
|
|
||||||
enforce_https('apache.org'),
|
|
||||||
enforce_https('google.com'),
|
|
||||||
enforce_https('svn.code.sf.net'),
|
|
||||||
enforce_https('googlecode.com'),
|
|
||||||
],
|
],
|
||||||
'Issue Tracker': http_warnings + [
|
'Issue Tracker': http_warnings + [
|
||||||
(re.compile(r'.*github\.com/[^/]+/[^/]+[/]*$'),
|
(re.compile(r'.*github\.com/[^/]+/[^/]+[/]*$'),
|
||||||
|
Loading…
Reference in New Issue
Block a user