mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-09-01 09:45:10 +00:00
Revert "Disable test instance to remove index."
This reverts commit 216b893b504757dcf88afa8266de42a751481af6.
This commit is contained in:
parent
9d97350f09
commit
b28d95b3bb
1 changed files with 3 additions and 11 deletions
14
web/index.js
14
web/index.js
|
@ -14,12 +14,6 @@ const DIST_ROOT = path.resolve(__dirname, 'dist');
|
||||||
app.proxy = true;
|
app.proxy = true;
|
||||||
|
|
||||||
app.use(async (ctx, next) => {
|
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 {
|
try {
|
||||||
await next();
|
await next();
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
@ -35,11 +29,9 @@ app.use(redirectMiddleware);
|
||||||
app.use(iframeDestroyerMiddleware);
|
app.use(iframeDestroyerMiddleware);
|
||||||
|
|
||||||
// Check if the request url matches any assets inside of /dist
|
// Check if the request url matches any assets inside of /dist
|
||||||
app.use(
|
app.use(serve(DIST_ROOT, {
|
||||||
serve(DIST_ROOT, {
|
maxage: 3600000, // set a cache time of one hour, helpful for mobile dev
|
||||||
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
|
app.use(serve(DIST_ROOT)); // Check if the request url matches any assets inside of /dist
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue