You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-7Lines changed: 9 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Caddy GitHub Webhook Payload Validation Module
2
2
3
-
This Caddy handler module validates GitHub webhook payloads by using a shared secret. It ensures that the incoming webhooks are legitimate and come from GitHub, thereby enhancing security for your application.
3
+
This Caddy handler module validates all GitHub-Like webhook payloads by using a shared secret. It ensures that the incoming webhooks are legitimate and come from GitHub or for example Spacelift, thereby enhancing security for your application.
4
4
5
5
## Directive
6
6
@@ -9,6 +9,7 @@ The directive for this module is `validate_github_webhook_payload`.
9
9
## Features
10
10
11
11
- Validates GitHub webhook payloads.
12
+
- Validates Spacelift webhook payloads.
12
13
- Uses a shared secret to ensure the request integrity.
13
14
- Compatible with Caddy v2.
14
15
@@ -22,15 +23,15 @@ To use this module, you will need to build Caddy with the module included. Here'
22
23
$ go install github.com/caddyserver/xcaddy/cmd/xcaddy@latest
23
24
```
24
25
25
-
2. Build Caddy with the `validate_github_webhook_payload` module:
26
+
2. Build Caddy with the `validate_github_like_webhook_payload` module:
To configure the `validate_github_webhook_payload` directive in your Caddyfile, provide the secret that you will use to validate the webhook payload.
34
+
To configure the `validate_github_like_webhook_payload` directive in your Caddyfile, provide the secret that you will use to validate the webhook payload.
34
35
35
36
### Caddyfile Example
36
37
@@ -41,7 +42,7 @@ To configure the `validate_github_webhook_payload` directive in your Caddyfile,
Replace `<your_secret_here>` with the actual secret that you have configured in your GitHub webhook settings.
54
+
Replace `<signature_header_field_name_here>` with the actual name of header transporting signature of webhook payload. It's `X-Signature-256` for Spacelift or `X-Hub-Signature-256` for Github for example.
In this example, Caddy will verify the incoming webhook payloads sent to `/webhook` using the secret `my_super_secret`.
91
+
In this example, Caddy will verify the incoming webhook payloads sent to `/webhook` using the secret `my_super_secret` and containg signature inside of `X-Hub-Signature-256` header field.
0 commit comments