diff --git a/src/libpoketube/init/pages-video.js b/src/libpoketube/init/pages-video.js index b637f23a..56db6261 100644 --- a/src/libpoketube/init/pages-video.js +++ b/src/libpoketube/init/pages-video.js @@ -217,13 +217,50 @@ module.exports = function (app, config, renderTemplate) { const secure = ["poketube.fun"].includes(req.hostname); const verify = req.hostname === "poketube.sudovanilla.com"; - - if (req.hostname !== "poketube.fun") { - if (config.invapi ==="https://invid-api.poketube.fun/bHj665PpYhUdPWuKPfZuQGoX/api/v1") { - return res.status(500).send( "Error: please edit your config.json to match your own instance, and please use your own API URL. see docs.invidious.io to how to setup invidious!"); - } - } + const officialHost = "poketube.fun"; + const officialApi ="https://invid-api.poketube.fun/bHj665PpYhUdPWuKPfZuQGoX/api/v1"; + if (req.hostname !== officialHost && config.invapi === officialApi) { + const message = ` + + +
+ It looks like you're using PokeTube's own Invidious API endpoint
+ (${officialApi}) for your custom instance.
+
+ Please edit your config.json to match your own setup — using
+ Poke’s shared API is kinda lame 😅 since it also rate-limits poketube.fun
+ itself when too many people use it.
+
+ Set up your own Invidious instance instead — it’s easy! + See the official setup guide: + docs.invidious.io +
+ +
+ Once you've updated config.json, restart your server and everything will work fine.
+