From b28d95b3bbddc8e5bab8e6a32b2358b84f6a6773 Mon Sep 17 00:00:00 2001 From: infinite-persistence Date: Thu, 22 Jul 2021 22:39:35 +0800 Subject: [PATCH] Revert "Disable test instance to remove index." This reverts commit 216b893b504757dcf88afa8266de42a751481af6. --- web/index.js | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/web/index.js b/web/index.js index 5b4090b71..b7ee5d01e 100644 --- a/web/index.js +++ b/web/index.js @@ -14,12 +14,6 @@ const DIST_ROOT = path.resolve(__dirname, 'dist'); app.proxy = true; app.use(async (ctx, next) => { - if (ctx.request.url !== '/robots.txt') { - ctx.status = 404; - ctx.body = 'Test instance disabled. Visit https://odysee.com for the actual site.'; - return; - } - try { await next(); } catch (err) { @@ -35,11 +29,9 @@ app.use(redirectMiddleware); app.use(iframeDestroyerMiddleware); // Check if the request url matches any assets inside of /dist -app.use( - serve(DIST_ROOT, { - maxage: 3600000, // set a cache time of one hour, helpful for mobile dev - }) -); +app.use(serve(DIST_ROOT, { + maxage: 3600000, // set a cache time of one hour, helpful for mobile dev +})); app.use(serve(DIST_ROOT)); // Check if the request url matches any assets inside of /dist