Make the URL configurable
This commit is contained in:
parent
0b31302ee3
commit
a7987d400f
6
index.js
6
index.js
|
@ -52,6 +52,10 @@ router.get("/", async (ctx) => {
|
|||
s.push(`Got request to screenshot ${params.url}<pre>`);
|
||||
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() }
|
||||
|
|
Loading…
Reference in New Issue
Block a user