Skip to content

Configuration ​

Every setting has a flag and an environment variable; the flag wins. looking-glass --help lists them, and looking-glass --version prints the version (dev for a build without a release tag).

Settings ​

FlagVariableDefaultDescription
-p, --port PORTPORT8080Port to listen on, on every interface.
--max-body BYTESMAX_BODY_BYTES1048576Body bytes reflected before the body is cut off.

--max-body must be positive. A MAX_BODY_BYTES that isn't a positive number is ignored, and the default applies.

sh
docker run --rm -p 9000:9000 -e PORT=9000 -e MAX_BODY_BYTES=65536 \
  ghcr.io/kloudkit/looking-glass:latest

Response Format ​

SelectorValuesEffect
X-Glass-Format headerhtml / jsonResponse format. Wins over the query param.
format query paramhtml / jsonFor browsers. Anything but json is html.

Shutdown ​

On SIGTERM or SIGINT, Looking Glass stops accepting connections and gives requests in flight 5 seconds to finish.

Released under the MIT License