I want users of my website to write me on slack by filling out a form. In my current setup, requests are simply made directly to slack. This is bad because the credentials are on the client side and if you extract them, you can post to any user or channel.
Here is what I would like to do:
browser → Caddy → Slack
Within Caddy, I would [optionally] like to do:
- redirecti the request to Slack API | Slack
- [filter JSON (eg. remove the channel, so the channel cannot be modified clientside)]
- [append JSON]
I tried to redirect the request with
proxy / https://hooks.slack.com/services/
which did not work.
There is a plugin for ratelimiting, but I did not find any for modifying JSON.
Do you think I could reach my goal with existing plugins or do I need to write a new one?