Dropbox WebHook
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
// How Dropbox handles webhooks: https://www.dropbox.com/developers/reference/webhooks | |
router.get('/api/dropbox/webhook', function (ctx, next) { | |
return new HTTPRequest({ ctx }).handle((request) => { | |
ctx.set('Content-Type', 'text/plain') | |
ctx.set('X-Content-Type-Options', 'nosniff') | |
ctx.body = request.data.challenge | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment