Allow IP addresses in URLs

Ref: https://github.com/mbrubeck/agate/pull/433
Co-authored-by: oooo-ps <l.trk@tuta.io>
This commit is contained in:
Johann150 2026-04-03 18:31:25 +02:00
parent 1536c382ab
commit 2d6dac4a2f
No known key found for this signature in database
GPG key ID: 9EE6577A2A06F8F1
3 changed files with 74 additions and 18 deletions

View file

@ -172,6 +172,8 @@ If you want to serve the same content for multiple domains, you can instead disa
When one or more `--hostname`s are specified, Agate will check that the hostnames and port in request URLs match the specified hostnames and the listening ports. If Agate is behind a proxy on another port and receives a request with an URL specifying the proxy port, this port may not match one of Agate's listening ports and the request will be rejected: it is possible to disable the port check with `--skip-port-check`.
If Agate receives a request using an IP address in the URL, it will check that the IP address from the URL matches the local IP address of the TCP connection. Because Unix sockets do not have an IP address, this check cannot be performed and any IP address will be permitted via Unix sockets.
### Certificates
Agate has support for using multiple certificates with the `--certs` option. Agate will thus always require that a client uses SNI, which should not be a problem since the Gemini specification also requires SNI to be used.