comparison mod_http_health/README.md @ 5689:09233b625cb9

mod_http_health: Copypaste IP access control code
author Kim Alvefur <zash@zash.se>
date Sun, 05 Nov 2023 19:22:46 +0100
parents 9bcd257dea4e
children
comparison
equal deleted inserted replaced
5688:429be658c0bb 5689:09233b625cb9
10 -- Other globally enabled modules here... 10 -- Other globally enabled modules here...
11 "http_health"; -- add 11 "http_health"; -- add
12 } 12 }
13 ``` 13 ```
14 14
15 ## Access control
16
17 By default only access via localhost is allowed. This can be adjusted with `http_health_allow_ips`. The following example shows the default:
18
19 ```
20 http_health_allow_ips = { "::1"; "127.0.0.1" }
21 ```
22
23 Access can also be granted to one IP range via CIDR notation:
24
25 ```
26 http_health_allow_cidr = "172.17.2.0/24"
27 ```
28
29 The default for `http_health_allow_cidr` is empty.
30
15 # Details 31 # Details
16 32
17 Adds a `http://your.prosody.example:5280/health` endpoint that returns either HTTP status code 200 when all appears to be good or 500 when any module 33 Adds a `http://your.prosody.example:5280/health` endpoint that returns either HTTP status code 200 when all appears to be good or 500 when any module
18 [status][doc:developers:moduleapi#logging-and-status] has been set to `error`. 34 [status][doc:developers:moduleapi#logging-and-status] has been set to `error`.
19 35