diff --git a/lib/routes/inspirehep/author.ts b/lib/routes/inspirehep/author.ts index ed7eb2b6d49076..768ebea1d06749 100644 --- a/lib/routes/inspirehep/author.ts +++ b/lib/routes/inspirehep/author.ts @@ -19,7 +19,15 @@ export const route: Route = { handler, }; -export const getAuthorById = (id: string) => cache.tryGet(`inspirehep:author:${id}`, () => ofetch(`${baseUrl}/api/authors/${id}`)); +export const getAuthorById = (id: string) => + cache.tryGet(`inspirehep:author:${id}`, () => + ofetch(`${baseUrl}/api/authors/${id}`, { + headers: { + accept: 'application/vnd+inspire.record.ui+json', + }, + parseResponse: JSON.parse, + }) + ); async function handler(ctx) { const id = ctx.req.param('id');