Skip to content

Commit

Permalink
Update webhook example configuration documentation
Browse files Browse the repository at this point in the history
* Update webhook example configuration based on #2447
  • Loading branch information
abraunegg committed Jul 11, 2023
1 parent b2bf6aa commit 94ccb7a
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions docs/USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -986,7 +986,7 @@ A webhook can be optionally enabled in the monitor mode to allow the onedrive pr

To enable this feature, you need to configure the following options in the config file:

```
```text
webhook_enabled = "true"
webhook_public_url = "<public-facing url to reach your webhook>"
```
Expand All @@ -997,17 +997,41 @@ Setting `webhook_enabled` to `true` enables the webhook in 'monitor' mode. The o

For example, below is a nginx config snippet to proxy traffic into the webhook:

```
```text
server {
listen 80;
location /webhooks/onedrive {
proxy_http_version 1.1;
proxy_pass http://127.0.0.1:8888;
}
}
```

With nginx running, you can configure `webhook_public_url` to `https://<your_host>/webhooks/onedrive`.

If you receive this application error:
```text
Subscription validation request failed. Response must exactly match validationToken query parameter.
```
The most likely cause for this error will be your nginx configuration. To resolve, potentially investigate the following configuration for nginx:

```text
server {
listen 80;
location /webhooks/onedrive {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Original-Request-URI $request_uri;
proxy_read_timeout 300s;
proxy_connect_timeout 75s;
proxy_buffering off;
proxy_http_version 1.1;
proxy_pass http://127.0.0.1:8888;
}
}
```

For any further nginx configuration assistance, please refer to: https://docs.nginx.com/

### More webhook configuration options

Below options can be optionally configured. The default is usually good enough.
Expand Down

0 comments on commit 94ccb7a

Please sign in to comment.