The whole module builds on zip. This is the rest of it — routers/, the relay, and
the 2,823-line in-house router underneath.
ONE ROUTE TABLE. Every address was registered on a hand-written router held in a
package variable built at import time, and the zip app in front of it was a single
app.All("/v1/*", relay) forwarding through a net/http adaptor into that router. A
short "promoted" list re-registered three addresses specifically so the fleet
document could NAME them, because a glob tells a host a prefix and nothing under
it: three operations authenticated, reachable and answering in production with no
generated SDK, no MCP tool, no CLI command, and nothing saying who served them.
Every address is its own route now, so every one is described, and the boundary
the relay crossed — with the OTel context it had to stow and restore over it — is
gone with the relay.
Registration is one entry point, called with the app instead of writing onto a
global at import. The filters go on FIRST, and that is not cosmetic: the router
walks its stack in registration order, so a filter added after a route never runs
before it.
ONE IDENTITY. The filters read a per-pod in-memory session store; the handlers read
the request's verified IAM token. The store's own comment recorded the cost — it is
filled by a hook that does not run when the embedded binary serves these routes, so
it answered nil on every request and the filters billed and rate-limited by the raw
key instead. Filters now ask the same function the handlers ask.
Two filters went entirely, both doing somebody else's job:
- Auto-signin accepted an MD5 of clientId:clientSecret, or HTTP Basic against the
configured pair, and minted an IsAdmin identity into that store. IAM mints
credentials. It was reachable only for /storage, which is why it survived.
- Static served a landing folder, the admin bundle, and /storage from a path
taken off the URL — with no cleaning, beside a sibling branch that checks for
"/.." — then rewrote main.<hash>.js on the way out. Static content is ingress
and the static plugin. Every route here is /v1.
A REFUSAL IS THE END OF THE REQUEST, and now says so. A filter used to write a
response and return, and the router inferred a refusal from something having been
written. Two places got that wrong: the demo-mode gate denied and then ran the
permission filter anyway, and the error envelope defaulted to 200 with a second
function beside it for callers who wanted a real status. One envelope, status
required.
Recording was two filters passing a username through a request parameter, because
a before-filter and an after-filter had no other way to share; it is one
middleware holding a local across the handler. The cookie rewriter went with the
store it patched. The prometheus filter counted /api throughput — a prefix this
service has never served — so its counter has always been zero.
The standalone binary serves the app on zip's own listener rather than a net/http
server wrapping it, and the ZAP transports take the same app as an http.Handler,
resolved per request: App.Fiber() hands out the current generation's router, and a
generation is a projection.
web/ keeps its React source and loses its Go.
Getting Started with Create React App
This project was bootstrapped with Create React App.
Available Scripts
In the project directory, you can run:
npm start
Runs the app in the development mode.
Open http://localhost:3000 to view it in your browser.
The page will reload when you make changes.
You may also see any lint errors in the console.
npm test
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
npm run build
Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
See the section about deployment for more information.
npm run eject
Note: this is a one-way operation. Once you eject, you can't go back!
If you aren't satisfied with the build tool and configuration choices, you can eject at any time. This command will remove the single build dependency from your project.
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.
You don't have to ever use eject. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.
Learn More
You can learn more in the Create React App documentation.
To learn React, check out the React documentation.
Code Splitting
This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting
Analyzing the Bundle Size
This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size
Making a Progressive Web App
This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app
Advanced Configuration
This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration
Deployment
This section has moved here: https://facebook.github.io/create-react-app/docs/deployment
npm run build fails to minify
This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify