This file contains hidden or 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
| function guid() { | |
| function s4() { | |
| return Math.floor((1 + Math.random()) * 0x10000) | |
| .toString(16) | |
| .substring(1); | |
| } | |
| return s4() + s4() + '-' + s4() + '-' + s4() + '-' + | |
| s4() + '-' + s4() + s4() + s4(); | |
| } |
This file contains hidden or 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
| export default (request) => { | |
| const kvstore = require('kvstore'); | |
| const xhr = require('xhr'); | |
| const vault = require('vault'); // You can use the Vault to store a header/key for your backend | |
| // to validate the request with, alternatively you can use IP whitelist | |
| const host = 'https://f8234c78.ngrok.io'; | |
| var url = host + '/v1/webhooks/pubnub'; | |
OlderNewer