feat: Opensearch tags / descriptor

This commit is contained in:
Tom Moor
2019-08-08 19:52:29 -07:00
parent ae1cf2d00c
commit dd95c9cba9
4 changed files with 41 additions and 1 deletions

View File

@ -11,6 +11,7 @@ import apexRedirect from './middlewares/apexRedirect';
import renderpage from './utils/renderpage';
import { isCustomSubdomain, parseDomain } from '../shared/utils/domains';
import { robotsResponse } from './utils/robots';
import { opensearchResponse } from './utils/opensearch';
import { NotFoundError } from './errors';
import { Team } from './models';
@ -146,7 +147,14 @@ router.get('/', async ctx => {
);
});
router.get('/robots.txt', ctx => (ctx.body = robotsResponse(ctx)));
router.get('/robots.txt', ctx => {
ctx.body = robotsResponse(ctx);
});
router.get('/opensearch.xml', ctx => {
ctx.type = 'text/xml';
ctx.body = opensearchResponse();
});
// catch all for react app
router.get('*', async (ctx, next) => {