This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var crypto = require('crypto'); | |
// Added for safer string equality checking | |
var bufferEq = require('buffer-equal-constant-time'); | |
var url = require('url'); | |
var SHARED_SECRET = "sup3rs3cr3t!!"; | |
function verifySignature(string_to_sign, signature, shared_secret) { | |
var hmac = crypto.createHmac('sha512', shared_secret); | |
hmac.write(string_to_sign); | |
hmac.end() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Initialize the scroll | |
page = es.search( | |
index = 'yourIndex', | |
doc_type = 'yourType', | |
scroll = '2m', | |
search_type = 'scan', | |
size = 1000, | |
body = { | |
# Your query's body | |
}) |