Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion api/searchQueue/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,15 @@ exports.handler = require("leo-sdk/wrappers/resource")(async (event, context, ca
})).on("finish", () => {
clearTimeout(fullTimeout);
clearTimeout(timeout);
callback(null, response)
//console.log(queue, "total size:", size, response.results.length);
callback(null, {
statusCode: 200,
headers: {
'content-encoding': "gzip",
'Content-Type': 'application/json',
},
body: require("zlib").gzipSync(JSON.stringify(response)).toString("base64"),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@czirker Do you want to check to see if the caller can accept a gzip response first? Or are we just assuming they can because this is an API specifically for Botmon? I'm good either way, just wanted to know your thoughts.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for this one it is just botmon so i was just assuming it accepts gzip

isBase64Encoded: true
});
});
});