diff --git a/app/const.js b/app/const.js index 4ddcd1a..f5f90a8 100644 --- a/app/const.js +++ b/app/const.js @@ -40,9 +40,9 @@ export const STATIC_PATH = `${process.env.PWD}/app/static/`; /** * Maximum capture processes that can be run in parallel. */ -export const MAX_PARALLEL_CAPTURES_TOTAL = 100; +export const MAX_PARALLEL_CAPTURES_TOTAL = 200; /** * Maximum capture processes that can be run in parallel for a given key. */ -export const MAX_PARALLEL_CAPTURES_PER_ACCESS_KEY = 2; \ No newline at end of file +export const MAX_PARALLEL_CAPTURES_PER_ACCESS_KEY = 20; \ No newline at end of file diff --git a/app/server.js b/app/server.js index fc58483..0fb1ddc 100644 --- a/app/server.js +++ b/app/server.js @@ -167,15 +167,10 @@ export default async function (fastify, opts) { SuccessLog.add(accessKey, pdf); - const html = nunjucks.render(`${TEMPLATES_PATH}success.njk`, { - pdfBase64: pdf.toString('base64'), - url: tweets.url - }); - return reply .code(200) - .header('Content-Type', 'text/html; charset=utf-8') - .send(html); + .header('Content-Type', 'application/pdf') + .send(pdf); } catch(err) { request.log.error(`Capture failed. ${err}`); diff --git a/app/templates/success.njk b/app/templates/success.njk deleted file mode 100644 index dc50c73..0000000 --- a/app/templates/success.njk +++ /dev/null @@ -1,27 +0,0 @@ - - -
-