mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-03-29 11:43:43 -04:00
Doc force-https (#7259)
* Doc force-https https://github.com/FreshRSS/FreshRSS/discussions/7252#discussioncomment-11951183 * Forgotten ^ * More proper support for comments
This commit is contained in:
committed by
GitHub
parent
d6c2daee51
commit
d7ca2f8768
@@ -1,3 +1,7 @@
|
||||
# Do not modify this file, which defines default values,
|
||||
# but specify your own values in ./data/force-https.txt
|
||||
# Examples of values, one per line: com, example.org, www.example.net
|
||||
|
||||
blogger.com
|
||||
creativecommons.org
|
||||
dailymotion.com
|
||||
|
||||
@@ -390,6 +390,11 @@ function customSimplePie(array $attributes = [], array $curl_options = []): \Sim
|
||||
if (is_array($force)) {
|
||||
$https_domains = array_merge($https_domains, $force);
|
||||
}
|
||||
|
||||
// Remove whitespace and comments starting with # / ;
|
||||
$https_domains = preg_replace('%\\s+|[\/#;].*$%', '', $https_domains) ?? $https_domains;
|
||||
$https_domains = array_filter($https_domains, fn(string $v) => $v !== '');
|
||||
|
||||
$simplePie->set_https_domains($https_domains);
|
||||
return $simplePie;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user