Tagged “web”
5 posts
Ask for the permission, not the key: connect services safely
Copying the environment variable to the other server costs one line less. Asking the owning service for a signed link, which opens one screen and expires, removes a place where the key that opens every screen can leak. The criterion and the three rules behind it.
A WhatsApp preview card for a static page, without a browser on the server
Our proposals are published as static folders, and pasting one into WhatsApp showed a bare link. WhatsApp does not render SVG, and we did not want a headless browser in the container just to draw a thumbnail. A native rasterizer with its fonts packed inside now writes a 1200×630 PNG on every publish. The pipeline, the two Next.js settings it needs, and what happens when it fails.
Give your site an endpoint that says which commit it came from
Thirty lines in a Next.js route, and "which version is live?" is answered with a curl and a git rev-parse. How we built it for vendear, where the commit comes from, and why the answer also says how the deploy was made.
Keep shared links on the right domain: canonical, og:url and the trailing slash
One variable with an extra slash or a leftover Vercel host, and every shared link goes out on the wrong domain. The six-line function that normalizes it in vendear, where it is used, and why it points to www and not the bare domain.
A page can be down without returning a single error
Our contact form answered, looked right and sent nothing. Two indexed routes returned 200 and were empty. No uptime monitor catches that, because nothing fails — what is missing is the last mile.