Maison-Retail-Management-International/mike
Frontend on Cloudflare Workers via OpenNext; backend settled on Render after a failed Workers attempt
Maison-Retail-Management-International/mike focused its recent commits on deployment infrastructure. The frontend is now configured for Cloudflare Workers using the OpenNext adapter, with wrangler.jsonc, a committed .env.production for build-time vars, and static asset cache headers. The backend went through a short Workers experiment - a stub worker was added then removed in the same run - and ended up on Render running the standard Express + R2 setup.
The one substantive code change is a CORS hardening patch in backend/src/index.ts: the static origin string is replaced with a callback that strips trailing slashes before comparing, which prevents a silent config-mismatch failure mode, and logs the allowed origin at startup.
What's in it
- Render-hosted backend After an aborted attempt to put the backend on Cloudflare's edge, it now runs as a conventional Node service on Render.
- Edge-hosted front end The front end is wired up to deploy to Cloudflare Workers, keeping the user-facing layer on the edge.
- Tightened backend access The rule governing which sites may call the backend was hardened, and a config pitfall closed along the way.
Direction
infrastructuresecurity
Activity
Threads of work (detailed view)
Maison-Retail-Management-International tightens who's allowed to call its backend
A small security change hardens how the fork's server decides which website it will accept requests from - and guards against a config slip that silently breaks everything.
CORS origin callback strips trailing slashes, logs allowed origin at startup
A one-commit change in Maison-Retail-Management-International/mike swaps Express's static CORS origin string for a callback that normalizes trailing slashes before comparing. Small, self-contained, and fixes a silent misconfiguration failure mode.
Backend Workers experiment added and removed; Render chosen instead
Maison-Retail-Management-International/mike tried running the Express backend on Cloudflare Workers, confirmed it doesn't work (LibreOffice dependency), and landed on Render. Four commits, near-zero net change.
Maison Retail Management moves Mike's frontend onto Cloudflare's edge
This fork now ships its user-facing app to Cloudflare Workers, the same edge network that puts your app close to wherever your users sit.