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 { | |
async fetch(request, env, ctx) { | |
const headers = request.headers; | |
if (headers.get('Sentry-Hook-Resource') !== 'event_alert') { | |
return new Response('Not correct type', { | |
headers: { 'content-type': 'text/plain' }, | |
status: 200, | |
}); | |
} | |
const body = await request.json(); |