diff --git a/index.js b/index.js index 8e2d6d3..55f5cda 100644 --- a/index.js +++ b/index.js @@ -52,6 +52,10 @@ router.get("/", async (ctx) => { s.push(`Got request to screenshot ${params.url}
`); const id = uuid(); let docker_id = ""; + if (!params.url) { + ctx.body = "specify url!"; + return; + } const starter = spawn( "docker", [ @@ -62,7 +66,7 @@ router.get("/", async (ctx) => { `${process.cwd()}/static:/opt/static`, "headless-fox", "./script3.sh", - '{"url": "pearson.pl", "third_party_domains": ["hotjar.com", "cookielaw.org"]}', + `{"url": "${params.url}", "third_party_domains": ["hotjar.com", "cookielaw.org", "facebook.com"]}`, id, ], { cwd: process.cwd() }