diff --git a/README.md b/README.md index 05ca2a5..800ec34 100644 --- a/README.md +++ b/README.md @@ -54,8 +54,9 @@ DEBUG=routewatch ./routewatch picked at random, each with its newest route (HTML) - `GET /prefixlength6/{length}` - The same for IPv6 - `GET /ip/{addr}` - The same JSON answer as `/api/v1/ip/{ip}` -- `GET /ip/` - The same, for the caller's own address, or the one a proxy names - in `True-Client-IP`, `X-Real-IP` or `X-Forwarded-For` +- `GET /ip/` - The same, for the caller's own address: the address the request + came from or, when that is a trusted proxy (`TRUSTED_PROXIES`, see + Configuration), the client address in its `X-Forwarded-For` ### API v1 @@ -84,7 +85,17 @@ and 4 seconds for the database reads behind `/status.json` and `/api/v1/stats`. An AS number, prefix or mask length that does not parse answers 400, as does a mask length out of range for its IP version. An AS the database does not hold, or a prefix with no live route, answers 404. The HTML pages give these errors as -plain text. +plain text. A 500 answer says only `Internal server error`, and a host name that +does not resolve only `could not resolve host name`; the detail goes to the log. + +Every answer carries `Strict-Transport-Security`, `Content-Security-Policy`, +`X-Frame-Options`, `X-Content-Type-Options`, `Referrer-Policy` and +`Permissions-Policy`. The Content-Security-Policy lets a page load content only +from the server, and does not allow inline content with `'unsafe-inline'`: the +pages keep their CSS and JavaScript in inline `