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
Comments in jenkinsfile starts with // not #
5 years ago
cpp_utils@2aca61e466 Updating cpp_utils, for the SSL silencing 5 years ago
.gitignore Added licence in the main.cpp header and updated argParse parameters 5 years ago
.gitmodules submodule cpp_utils repo path changed 5 years ago
CMakeLists.txt Added licence in the main.cpp header and updated argParse parameters 5 years ago
Jenkinsfile Comments in jenkinsfile starts with // not # 5 years ago
LICENSE Initial commit 5 years ago
README.md Updated submodule and README 5 years ago
WebhookMessage.hpp Updated submodule and README 5 years ago
main.cpp Checking client hostname and secret 5 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