---
title: "Comment by LooCraft Labs on \"How to send an HTML form to Discord\" | Hashnode"
description: "Good pattern keeping the webhook URL behind a Worker instead of exposing it in client-side JS. A few extra webhook hardening details that save headaches later:"
url: "https://hashnode.com/posts/html-form-to-discord/6b07883a3e971c08b937ac2e/comment/6b11951237159dedcbc4cdee"
---

[Discussion](https://hashnode.com/posts/html-form-to-discord/6b07883a3e971c08b937ac2e)

Comment [How to send an HTML form to Discord](https://hashnode.com/posts/html-form-to-discord/6b07883a3e971c08b937ac2e)

[LooCraft Labs](https://hashnode.com/@loocraftlabs)

[23h ago](https://hashnode.com/posts/html-form-to-discord/6b07883a3e971c08b937ac2e/comment/6b11951237159dedcbc4cdee)

Good pattern keeping the webhook URL behind a Worker instead of exposing it in client-side JS. A few extra webhook hardening details that save headaches later:

1.  **Enforce `allowed_mentions: { parse: [] }` in the payload**: Even if you sanitize input, explicitly setting `allowed_mentions` at the Discord API payload level guarantees that `@everyone`, `@here`, or role mentions cannot trigger pings.
2.  **Webhook rotation on team changes**: Discord webhooks remain active even after the staff member who created them leaves the server. Keep a periodic audit of Server Settings → Integrations → Webhooks and regenerate URLs whenever someone with access to the channel or Worker secrets rotates off the team.
3.  **Separate channels & rate limits**: Use dedicated low-privilege channels for external form submissions so a spam burst doesn't bury real ops/moderation alerts.
