How to: Multiple providers can be combined
gosmee server --allowed-ips 192.30.252.0/22 --allowed-ips 35.231.145.151 --allowed-ips 34.199.54.113 --trust-proxy
```

Official IP ranges documentation:

- GitHub: [IP Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/about-githubs-ip-addresses)
- GitLab.com: [IPv4 Addresses](https://docs.gitlab.com/ee/user/gitlab_com/index.html#ipv4-addresses)
- Bitbucket Cloud: [IP Ranges Documentation](https://support.atlassian.com/bitbucket-cloud/docs/what-are-the-bitbucket-cloud-ip-addresses-i-should-use-to-configure-my-corporate-firewall/)

Environment variables:

- `GOSMEE_ALLOWED_IPS`: Comma-separated list of allowed IPs/CIDR ranges
- `GOSMEE_TRUST_PROXY`: Set to any value to trust proxy headers

The server logs will show:

- Rejected POST requests with the client's IP address
- Whether the IP was obtained from proxy headers (when --trust-proxy is enabled)
- Standard request logging including status code 403 for rejected IPs

Note: If no IP restrictions are configured, all POST requests will be allowed.

##### Payload Size and Memory Management

###### Server-Side

To protect server resources, `gosmee server` enforces a maximum payload size for incoming webhooks. By default, this limit is 25MB, matching GitHub's standard. You can configure this limit using the `--max-body-size` flag (value is in bytes).

Example:

```shell