diff options
| -rw-r--r-- | Docker/README.md | 4 | ||||
| -rw-r--r-- | README.fr.md | 2 | ||||
| -rw-r--r-- | README.md | 2 | ||||
| -rw-r--r-- | app/Models/Feed.php | 3 | ||||
| -rw-r--r-- | docs/en/users/02_First_steps.md | 1 | ||||
| -rw-r--r-- | docs/en/users/05_Configuration.md | 2 | ||||
| -rw-r--r-- | docs/en/users/09_refreshing_feeds.md | 2 | ||||
| -rw-r--r-- | docs/en/users/WebSub.md | 26 | ||||
| -rw-r--r-- | docs/fr/users/02_First_steps.md | 1 | ||||
| -rw-r--r-- | docs/fr/users/08_PubSubHubbub.md | 15 | ||||
| -rw-r--r-- | p/api/pshb.php | 1 |
11 files changed, 51 insertions, 8 deletions
diff --git a/Docker/README.md b/Docker/README.md index 3346ab607..ea0d542cd 100644 --- a/Docker/README.md +++ b/Docker/README.md @@ -5,8 +5,8 @@ FreshRSS is a self-hosted RSS feed aggregator. -* Official website: [freshrss.org](https://freshrss.org/) -* Official Docker images: [hub.docker.com/r/freshrss/freshrss](https://hub.docker.com/r/freshrss/freshrss/) +* Official website: [`freshrss.org`](https://freshrss.org/) +* Official Docker images: [`hub.docker.com/r/freshrss/freshrss`](https://hub.docker.com/r/freshrss/freshrss/) * Repository: [`github.com/FreshRSS/FreshRSS`](https://github.com/FreshRSS/FreshRSS/) * Documentation: [`freshrss.github.io/FreshRSS`](https://freshrss.github.io/FreshRSS/) * License: [GNU AGPL 3](https://www.gnu.org/licenses/agpl-3.0.html) diff --git a/README.fr.md b/README.fr.md index 56bbc7180..c38d8cc8c 100644 --- a/README.fr.md +++ b/README.fr.md @@ -13,7 +13,7 @@ Il permet de gérer plusieurs utilisateurs, dispose d’un mode de lecture anony Il y a une API pour les clients (mobiles), ainsi qu’une [interface en ligne de commande](cli/README.md). Grâce au standard [WebSub](https://www.w3.org/TR/websub/) (anciennement [PubSubHubbub](https://github.com/pubsubhubbub/PubSubHubbub)), -FreshRSS est capable de recevoir des notifications push instantanées depuis les sources compatibles, telles [Mastodon](https://joinmastodon.org), [Friendica](https://friendi.ca), [WordPress](https://wordpress.org/plugins/pubsubhubbub/), Blogger, FeedBurner, etc. +FreshRSS est capable de recevoir des notifications push instantanées depuis les sources compatibles, [Friendica](https://friendi.ca), [WordPress](https://wordpress.org/plugins/pubsubhubbub/), Blogger, Medium, etc. FreshRSS supporte nativement le moissonnage du Web (Web Scraping) basique, basé sur [XPath](https://www.w3.org/TR/xpath-10/), pour les sites Web sans flux RSS / Atom. @@ -13,7 +13,7 @@ It is a multi-user application with an anonymous reading mode. It supports custo There is an API for (mobile) clients, and a [Command-Line Interface](cli/README.md). Thanks to the [WebSub](https://www.w3.org/TR/websub/) standard (formerly [PubSubHubbub](https://github.com/pubsubhubbub/PubSubHubbub)), -FreshRSS is able to receive instant push notifications from compatible sources, such as [Mastodon](https://joinmastodon.org), [Friendica](https://friendi.ca), [WordPress](https://wordpress.org/plugins/pubsubhubbub/), Blogger, FeedBurner, etc. +FreshRSS is able to receive instant push notifications from compatible sources, such as [Friendica](https://friendi.ca), [WordPress](https://wordpress.org/plugins/pubsubhubbub/), Blogger, Medium, etc. FreshRSS natively supports basic Web scraping, based on [XPath](https://www.w3.org/TR/xpath-10/), for Web sites not providing any RSS / Atom feed. diff --git a/app/Models/Feed.php b/app/Models/Feed.php index b75d12b4e..ed1468744 100644 --- a/app/Models/Feed.php +++ b/app/Models/Feed.php @@ -1088,7 +1088,8 @@ class FreshRSS_Feed extends Minz_Model { CURLOPT_POSTFIELDS => http_build_query([ 'hub.verify' => 'sync', 'hub.mode' => $state ? 'subscribe' : 'unsubscribe', - 'hub.topic' => $url, 'hub.callback' => $callbackUrl, + 'hub.topic' => $url, + 'hub.callback' => $callbackUrl, ]), CURLOPT_USERAGENT => FRESHRSS_USERAGENT, CURLOPT_MAXREDIRS => 10, diff --git a/docs/en/users/02_First_steps.md b/docs/en/users/02_First_steps.md index 813514603..6cee33ece 100644 --- a/docs/en/users/02_First_steps.md +++ b/docs/en/users/02_First_steps.md @@ -25,5 +25,6 @@ Now that you’ve mastered basic use, it’s time to configure FreshRSS to impro * [Access your feeds on a mobile device](06_Mobile_access.md) * [Add some extensions](https://github.com/FreshRSS/Extensions) * [Frequently asked questions](07_Frequently_Asked_Questions.md) +* [Receive articles instantly with WebSub](WebSub.md) FreshRSS has a built-in engine that [scrapes a website to create an own feed](11_website_scraping.md). diff --git a/docs/en/users/05_Configuration.md b/docs/en/users/05_Configuration.md index ee8b8ec7f..654529391 100644 --- a/docs/en/users/05_Configuration.md +++ b/docs/en/users/05_Configuration.md @@ -190,7 +190,7 @@ Extensions can be managed from this menu. Note that while extensions can be remo 1. User control is based on the `.htaccess` file. 2. It is best practice to place the `.htaccess` file in the `./i/` subdirectory so the API and other third party services can work. -3. If you want to limit all access to registered users only, place the file in the FreshRSS directory itself or in a parent directory. Note that WebSub and API will not work! +3. If you want to limit all access to registered users only, place the file in the FreshRSS directory itself or in a parent directory. Note that [WebSub](WebSub.md) and API will not work! 4. Example `.htaccess` file for a user "marie": ```apache diff --git a/docs/en/users/09_refreshing_feeds.md b/docs/en/users/09_refreshing_feeds.md index 6d9c2af55..0f3debfc3 100644 --- a/docs/en/users/09_refreshing_feeds.md +++ b/docs/en/users/09_refreshing_feeds.md @@ -114,7 +114,7 @@ If your FreshRSS instance uses no authentication (public instance, default user) ### Background -FreshRSS does not, by design, supports pull refreshes at frequencies higher than once every 15 minutes. But FreshRSS supports instant push (WebSub). +FreshRSS does not, by design, supports pull refreshes at frequencies higher than once every 15 minutes. But FreshRSS supports [instant push (WebSub)](WebSub.md). FreshRSS is part of an RSS ecosystem. A typical reaction that we have seen from several servers is to simply ban by, IP, user-agent, or to remove their RSS feed altogether. Bad user behaviours affect the larger community. diff --git a/docs/en/users/WebSub.md b/docs/en/users/WebSub.md new file mode 100644 index 000000000..e8499b8e5 --- /dev/null +++ b/docs/en/users/WebSub.md @@ -0,0 +1,26 @@ +# The WebSub protocol + +[WebSub](https://www.w3.org/TR/websub/) (formerly [PubSubHubbub](https://github.com/pubsubhubbub/PubSubHubbub)) is a standard protocol +to instantly receive (push) notifications when some new content is available on a remote server, +for instance when a new article is available via RSS / ATOM. + +FreshRSS supports WebSub natively. +Just like for the FreshRSS API to work from a mobile phone, supporting WebSub requires that your FreshRSS instance is routable (that is to say, with a public IP, that can be accessed from third-party servers). + +## Examples of feeds + +Many individual feeds and platforms already offer instant notifications through WebSub, such as: +[Friendica instances](https://friendi.ca), WordPress (from WordPress.com or with [an extension](https://wordpress.org/plugins/pubsubhubbub/)), Blogger sites, Medium sites, etc. + +## Test WebSub + +You can test that WebSub works properly in your FreshRSS instance with a service such as: + +* <http://push-tester.cweiske.de> + +## Add WebSub to your RSS / ATOM feeds + +Your CMS (e.g. WordPress) might already offer WebSub as an option. Otherwise, you can make a solution that notifies a hub such as: + +* <https://websubhub.com> +* <https://pubsubhubbub.appspot.com> diff --git a/docs/fr/users/02_First_steps.md b/docs/fr/users/02_First_steps.md index a89545f4c..15fed1263 100644 --- a/docs/fr/users/02_First_steps.md +++ b/docs/fr/users/02_First_steps.md @@ -39,3 +39,4 @@ sur FreshRSS : * [Accédez à vos flux même sur mobile](06_Mobile_access.md) * [Ajoutez quelques extensions](https://github.com/FreshRSS/Extensions) * [Foire aux questions](07_Frequently_Asked_Questions.md) +* [Recevoir les articles instantannément grâce à WebSub](08_PubSubHubbub.md) diff --git a/docs/fr/users/08_PubSubHubbub.md b/docs/fr/users/08_PubSubHubbub.md index 4b382911c..ee46916b4 100644 --- a/docs/fr/users/08_PubSubHubbub.md +++ b/docs/fr/users/08_PubSubHubbub.md @@ -19,4 +19,17 @@ Pour pouvoir être notifié, les abonnés doivent fournir une adresse accessible Depuis la version 1.1.2-beta, FreshRSS supporte officiellement WebSub. Vous pouvez donc recevoir en temps réel les articles des sites qui affichent dans leur flux RSS un « hub », -tels [Mastodon](https://joinmastodon.org), [Friendica](https://friendi.ca), WordPress (WordPress.com ou avec [une extension](https://wordpress.org/plugins/pubsubhubbub/)), Blogger, FeedBurner, Slashdot, etc. +tels [Friendica](https://friendi.ca), WordPress (WordPress.com ou avec [une extension](https://wordpress.org/plugins/pubsubhubbub/)), Blogger, Medium, etc. + +## Tester WebSub + +Vous pouver tester que le support WebSub de votre instance FreshRSS est correct avec un service comme : + +* <http://push-tester.cweiske.de/> + +## Ajouter WebSub à votre flux RSS / ATOM + +Votre CMS (par exemple WordPress) supporte peut-être déjà WebSub en option. Sinon, vous pouvez faire une solution qui notifie un hub tel : + +* <https://websubhub.com/> +* <https://pubsubhubbub.appspot.com> diff --git a/p/api/pshb.php b/p/api/pshb.php index 9c9323da5..f69329f1b 100644 --- a/p/api/pshb.php +++ b/p/api/pshb.php @@ -31,6 +31,7 @@ if ($canonical === false) { header('Connection: close'); exit(isset($_REQUEST['hub_challenge']) ? $_REQUEST['hub_challenge'] : ''); } + // https://github.com/w3c/websub/issues/106 , https://w3c.github.io/websub/#content-distribution header('HTTP/1.1 410 Gone'); Minz_Log::warning('Warning: Feed key not found!: ' . $key, PSHB_LOG); die('Feed key not found!'); |
