compress
Gzips pages, data and JSON for clients that accept it, flushing streamed responses as they go.
go tool tern add compress Plugins
A plugin adds hooks, middleware, endpoints or tags to every page. tern add puts one in your app’s main.go, and gets its module when it isn’t Tern’s own.
go tool tern add compress healthGzips pages, data and JSON for clients that accept it, flushing streamed responses as they go.
go tool tern add compress Lets other origins call the app's endpoints, with preflight requests answered.
go tool tern add cors Liveness and readiness endpoints, /healthz and /readyz, for load balancers and orchestrators.
go tool tern add health Resizes remote images for <Image src="https://…">, with a disk cache.
go tool tern add images Prometheus metrics at /metrics: requests by route and status, their durations, and the Go runtime.
go tool tern add metrics Limits how often each client changes things, such as form actions and API writes, with 429 and Retry-After past the limit.
go tool tern add ratelimit Logs every request with slog: method, path, status, time and the request's ID.
go tool tern add requestlog Security headers on every response: no framing by other sites, trimmed referrers, powerful browser features off, and HSTS when asked.
go tool tern add secure Per-user data in an encrypted, signed cookie.
go tool tern add sessions Reads SESSION_SECRET
Tells people from bots and recognizes devices, from TLS and HTTP fingerprints and a client check.
go tool tern add signals Sign in with GitHub, Google or any OpenID Connect provider.
It needs each provider's client ID and secret: see the docs for the options.
Makes the app an OAuth 2.1 and OpenID Connect provider, with consent, for other apps and assistants.
It needs an issuer URL, a store and its clients: see the docs for the options.
None listed yet. Yours could be the first: see below.