An HTTP server which bites on Gitea POST webhooks
It utilizes the http://matetelki.eu:3000/denes/cpp_utils library.
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
denes
2d49ecc3e6
gitea.matetelki.eu/webfish/master This commit looks good
Details
|
6 years ago | |
---|---|---|
cpp_utils@2aca61e466 | 6 years ago | |
.gitignore | 6 years ago | |
.gitmodules | 6 years ago | |
CMakeLists.txt | 6 years ago | |
Jenkinsfile | 6 years ago | |
LICENSE | 6 years ago | |
README.md | 6 years ago | |
WebhookMessage.hpp | 6 years ago | |
main.cpp | 6 years ago |
README.md
webfish
An HTTP server which bites on Gitea POST webhooks
It utilizes the http://matetelki.eu:3000/denes/cpp_utils library.
usage: ./webfish <ARGS> [OPTIONS]
Required arguments:
-c STRING Client hostname to check
-f STRING File to execute on receiving a message
-s STRING Look for a line in the msg body with '"secret": "SECRET"'
Options:
-h, --help Prints this help message
-p INT Listenning port (default is 5050)
For example: ./webfish -c matetelki.eu -f ./hugo_updater.sh -s SECRET
Todos:
- The
Content-Length: 1900
is disregarded. The secret is in the first chunk anyway:- bad request? Reply & close connection.
- correct request? Reply after the first chunk, while the client is still talking.
- The
-h
does not work, only./webfish -h, --help
:P - The logging needs some tuning