1
0
mirror of synced 2025-12-22 19:34:15 -05:00

Record redirect events (#16181)

* Record redirect events

* Update index.js

* Update record-redirect.js

* Only run when it can send to Hydro

* Update record-redirect.js
This commit is contained in:
Kevin Heis
2020-10-26 10:18:42 -07:00
committed by GitHub
parent 222d419e0f
commit 93849795e0
3 changed files with 37 additions and 2 deletions

View File

@@ -21,6 +21,13 @@ module.exports = class Hydro {
this.schemas = SCHEMAS
}
/**
* Can check if it can actually send to Hydro
*/
maySend () {
return Boolean(this.secret && this.endpoint)
}
/**
* Generate a SHA256 hash of the payload using the secret
* to authenticate with Hydro