✦ November 18, 2026 · Paul Richter

Gating the
voice gateway.

rile.cc was serving text-to-speech to anyone on the internet. One Caddy matcher closed it without breaking the services that depend on it.

An open endpoint nobody asked for

While auditing the gateway at rile.cc before writing up the API examples, I found one route that answered anyone: /v1/audio/speech. Every other route (model listing, chat completions, search, the media pipeline) correctly returned 401 without a bearer key. But a POST with a valid payload to the speech endpoint came back 200 OK and 27 KB of audio. Free compute, open to the internet.

Not a data leak: speech synthesis produces no secrets. But it's real GPU work on hardware I pay for, and an open endpoint on a public gateway is a magnet.

Gate, don't disable

The obvious fix was to shut it off. Wrong call. The TTS path on my own machines depends on that pool, and the voice stack is a three-year-old production service. Disabling it to close an exposure would break working software, the classic mistake of fixing security by breaking function.

The fix was one matcher in the Caddy config:

@auth header Authorization "Bearer <shared-token>"
reverse_proxy @auth 192.168.1.141:8082 192.168.1.141:8090 \
              192.168.1.141:8091 192.168.1.141:8092 \
              192.168.1.142:8082 192.168.1.142:8090 \
              192.168.1.142:8091 192.168.1.142:8092
respond 401

Authorized requests hit the eight-backend pool; everyone else falls through to a bare 401.

The verify loop

After the rebuild:

  • anonymous POST to the speech endpoint → 401
  • POST with the shared bearer → 200, audio/mpeg
  • anonymous model listing → still 401
  • health probe → still 200, no key

And the one client script that calls the pool now sends the same shared token, so nothing changed for the services that use it. Two hashes compared, one token swapped, done.

The rule

Audit every route before you advertise the API. The status code you actually get back (anonymously, right now) is the only honest description of the endpoint. An endpoint that returns 200 to anyone is open, whether or not the page calling it says otherwise.