Basically what i want, is that if i go to a specific url, like example.com/url/webhook/command
, make caddy run something like echo $(date) > /opt/visits
You could write a script with the functionality you want, then use the CGI plugin to call the script from a certain endpoint. The idea is to provide dynamic content for the site, but the script can do anything you could do with a normal script - Caddy just takes the standard output and returns it to the connecting client.
That’s similar to the websocket directive: https://caddyserver.com/docs/websocket
Although you’d need a Websocket client.
Alright, thanks for the information,
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.