The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
Update verify-request.ts
Kiran Kf9cc8fb4aa8e
diff --git a/apps/web/lib/integrations/slack/verify-request.ts b/apps/web/lib/integrations/slack/verify-request.tsindex c36a7477b0..bbe2c342f8 100644--- a/apps/web/lib/integrations/slack/verify-request.ts+++ b/apps/web/lib/integrations/slack/verify-request.ts@@ -12,8 +12,12 @@ interface SlackRequestVerificationOptions {// Verifies the signature of an incoming request from Slack.export const verifySlackSignature = async (req: Request, body: string) => {+ if (!process.env.SLACK_SIGNING_SECRET) {+ throw new Error("SLACK_SIGNING_SECRET is not set");+ }+const options: SlackRequestVerificationOptions = {- signingSecret: process.env.SLACK_SIGNING_SECRET!,+ signingSecret: process.env.SLACK_SIGNING_SECRET,body: body,headers: {"x-slack-signature": req.headers.get("x-slack-signature") ?? "",