forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on dcf123a8823bd55f0a656ce94de6b865f41dc08aFiltered to server.tsClear filter

2026-09-19

fix: 🔒 security headers and sanitized editor input - server.ts sends CSP frame-ancestors/object-src/base-uri, X-Frame-Options, nosniff, Referrer-Policy and HSTS on every file it serves - RichTextEditor sanitizes HTML it loads from props (saved answers)Burak Boduroğlu · a3ac38f
fix: 🔒 security headers and sanitized editor input
- server.ts sends CSP frame-ancestors/object-src/base-uri, X-Frame-Options,
  nosniff, Referrer-Policy and HSTS on every file it serves
- RichTextEditor sanitizes HTML it loads from props (saved answers)

2026-09-15

refactor: 🧹 one source for the deployment defaults - the defaults (PORT, HOST, BACKEND_ORIGIN) are written once, in the image ENV block in Containerfile; server.ts now refuses to boot without them instead of carrying its own copies, so a stripped image fails loudly - compose healthcheck asks the container for PORT; the deploy gate and the verify step read the running container for the port instead of parsing a second copy out of the operator file - drop deploy/Containerfile.runtime: CI now builds the repo Containerfile, so there is no CI-only twin whose base image or ENV can drift - docs follow: knobs paragraph, env example and unit header describe overrides of the image defaults rather than fallbacks scattered across filesAhmet Kaan Gümüş · 6fd81aa
refactor: 🧹 one source for the deployment defaults
- the defaults (PORT, HOST, BACKEND_ORIGIN) are written once, in the image ENV
  block in Containerfile; server.ts now refuses to boot without them instead
  of carrying its own copies, so a stripped image fails loudly
- compose healthcheck asks the container for PORT; the deploy gate and the
  verify step read the running container for the port instead of parsing a
  second copy out of the operator file
- drop deploy/Containerfile.runtime: CI now builds the repo Containerfile, so
  there is no CI-only twin whose base image or ENV can drift
- docs follow: knobs paragraph, env example and unit header describe overrides
  of the image defaults rather than fallbacks scattered across files
fix: 🔌 default the backend origin to the co-located loopback - server.ts and the vite dev proxy now default BACKEND_ORIGIN to http://127.0.0.1:7656 instead of the public origin — that is where the compose stack publishes the backend on this machine, and what the frontend container reaches under host networking - nothing in a browser bundle changes: the SPA still calls its own origin and the server owns the backend address - README: proxy note and the defaults list follow the new fallbackAhmet Kaan Gümüş · 5f63fb5
fix: 🔌 default the backend origin to the co-located loopback
- server.ts and the vite dev proxy now default BACKEND_ORIGIN to
  http://127.0.0.1:7656 instead of the public origin — that is where the
  compose stack publishes the backend on this machine, and what the frontend
  container reaches under host networking
- nothing in a browser bundle changes: the SPA still calls its own origin and
  the server owns the backend address
- README: proxy note and the defaults list follow the new fallback
fix: 🔌 host networking so the proxy reaches the backend on loopback - run the frontend with network_mode: host: a bridge network resolves 127.0.0.1 inside the container, so BACKEND_ORIGIN=http://127.0.0.1:7656 (the backend is published on the host loopback) refused every connection - drop the service ports: mapping and the environment: block — under host networking the app binds the host interface directly, and every knob now arrives through env_file with nothing shadowing it - server.ts binds HOST (default 0.0.0.0): a server sets HOST=127.0.0.1 so the app stays on loopback and the reverse proxy is the only door - docs: env example now ships BACKEND_ORIGIN/HOST/PORT for a co-located stackAhmet Kaan Gümüş · f643e6a
fix: 🔌 host networking so the proxy reaches the backend on loopback
- run the frontend with network_mode: host: a bridge network resolves
  127.0.0.1 inside the container, so BACKEND_ORIGIN=http://127.0.0.1:7656
  (the backend is published on the host loopback) refused every connection
- drop the service ports: mapping and the environment: block — under host
  networking the app binds the host interface directly, and every knob now
  arrives through env_file with nothing shadowing it
- server.ts binds HOST (default 0.0.0.0): a server sets HOST=127.0.0.1 so the
  app stays on loopback and the reverse proxy is the only door
- docs: env example now ships BACKEND_ORIGIN/HOST/PORT for a co-located stack
fix: 🔌 point frontend proxy at remote backendBurak Boduroğlu · 4edb34b
fix: 🔌 point frontend proxy at remote backend

- default development and production proxy traffic to https://hezarfen.dizey.sh
- allow BACKEND_ORIGIN overrides for local or alternate deployments
- remove the obsolete shared backend Podman network dependency
- document the remote backend and Compose usage

2026-07-23

✨ feat(container): serve the SPA with Bun, drop nginxAhmet Kaan Gümüş · 4f9c8ec
✨ feat(container): serve the SPA with Bun, drop nginx

Replace the nginx serving stage with a small Bun.serve script (server.ts)
that serves the built dist/ and reverse-proxies /api/* to the backend —
both plain HTTP and the exam-room WebSocket (forwarding the session
cookie), stripping the /api prefix exactly as nginx did. Same-origin is
preserved, so no CORS/cookie changes. (nginx.conf + its whitelist test
were removed in the prior commit.)

Multi-stage Containerfile: bun build -> bun:1-slim runtime running
server.ts (no node_modules — server.ts uses only Bun built-ins).
BACKEND_ORIGIN points the proxy at the backend on the compose network;
healthcheck moves to a bun one-liner (slim image has no curl). Verified
end-to-end under podman compose: SPA + asset caching + /api proxy + a
live exam WS state frame round-tripping through the bridge on :5173.