diff --git a/src/libpoketube/init/pages-404-and-main.js b/src/libpoketube/init/pages-404-and-main.js index f2a59552..bea1ed36 100644 --- a/src/libpoketube/init/pages-404-and-main.js +++ b/src/libpoketube/init/pages-404-and-main.js @@ -144,6 +144,50 @@ module.exports = function (app, config, renderTemplate) { ); + 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 Poke'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.
+