Skip to content

Commit b7450de

Browse files
committed
webhook-proxy: Also forward headers passed in the request
1 parent dafa45e commit b7450de

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/server/routes/webhookProxy.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ router.post("/:webhookId", async (req, res) => {
66
const webhookUrl = `${process.env.DISCORD_WEBHOOK_URL}/${req.params.webhookId}/${process.env.DISCORD_WEBHOOK_TOKEN}`
77
const webhookData = req.body
88
try {
9-
await axios.post(webhookUrl, webhookData, { params: req.query })
9+
await axios.post(webhookUrl, webhookData, {
10+
params: req.query,
11+
headers: req.headers,
12+
})
1013
res.status(200).send("Webhook sent successfully")
1114
return
1215
} catch (error) {

0 commit comments

Comments
 (0)