Skip to content

HTTP endpoint reference

Every configured listener uses one handler. Proxy requests and the operations interface therefore share the same address and network security boundary.

Proxy methods

MethodBehavior
GETServe from cache or stream a successful origin response into the cache.
HEADReturn local headers, or download the entire missing object before returning headers.
CONNECTReject, create an end-to-end TCP tunnel, or intercept TLS according to configuration.
OtherReturn 405 Method Not Allowed for normal proxy targets.

Target hosts outside both configured domain lists receive 403 Forbidden. Invalid cacheable requests receive 400 Bad Request.

Operations pages and API

PathContent typeConditionsPurpose
/_goaptcacher/HTMLalways routedInstance overview
/_goaptcacher/cacheHTMLalways routedCache and filesystem summary
/_goaptcacher/statsHTMLalways routedLifetime and 14-day statistics
/_goaptcacher/setupHTMLalways routedGenerated client setup examples
/_goaptcacher/api/statsJSONalways routedMachine-readable statistics
/_goaptcacher/style.cssCSSalways routedEmbedded UI stylesheet
/_goaptcacher/favicon.icoiconalways routedEmbedded UI icon

index.enable does not currently disable these routes. There is no authentication or authorization layer.

Certificate endpoints

PathConditionResult when unavailable
/_goaptcacher/goaptcacher.crthttps.intercept: true404 HTTPS interception not enabled
/_goaptcacher/revocation.crlhttps.enable_crl: true and CRL file exists404 CRL not enabled or file-not-found response

The certificate route serves the file configured by https.cert. The CRL route serves <cache_directory>/crl.pem.

Debug endpoints

When debug.enable: true:

PathPurpose
/_goaptcacher/debugBuild, runtime, pprof configuration, and memory JSON
/_goaptcacher/debug/pprof/Profile index
/_goaptcacher/debug/pprof/cmdlineProcess command line
/_goaptcacher/debug/pprof/profileCPU profile
/_goaptcacher/debug/pprof/symbolProgram-counter lookup
/_goaptcacher/debug/pprof/traceRuntime trace
/_goaptcacher/debug/pprof/<name>Named Go runtime profile such as heap or goroutine

With debug.allow_remote: false, non-loopback source addresses receive 403 Forbidden. These routes are present independently of debug.pprof.enable, which controls periodic files only.

Root and standard paths

PathStatusPurpose
/406 Not AcceptableCompatibility signal for auto-apt-proxy, with browser redirect hint
/_goaptcacher307 Temporary RedirectCanonical slash redirect
/favicon.ico200 OKEmbedded icon
/robots.txt200 OKDisallow all crawlers
/.well-known/security.txt200 OKGitLab security contact and dynamic seven-day expiry

The Location header for / is set after the response status is written in the current implementation, so clients should use the HTML hint or request /_goaptcacher/ directly rather than relying on an HTTP redirect.

Unknown internal route

A path below /_goaptcacher/ that is not recognized returns a rendered 404 page. An unknown normal proxy target is processed according to domain policy and method rather than treated as a local route.

Health check

Use the JSON API:

bash
curl --fail --silent --show-error \
  http://127.0.0.1:8090/_goaptcacher/api/stats >/dev/null

Do not use / with a health checker that expects 2xx.

Released under the MIT License.