Dev Log
Prepared a private contact-form service for staging
What changed
- Reworked all six contact workflows to use one same-origin form endpoint instead of exposing provider-specific browser keys.
- Added strict server-side schemas, private recipient routing, fixed subjects, safe email rendering, rate limiting, honeypot checks, and Cloudflare Turnstile verification.
- Styled the notification HTML with Bailey’s restrained email system: a soft-gray canvas, centered white card, charcoal header, precision-blue accents, compact field labels, and a plain-text fallback. The template has no remote images, scripts, or tracking.
- Added one optional careers resume field for PDF or DOCX files up to 5 MiB. Files are forwarded privately with the inquiry and are not stored on the website server or published at a download URL.
- Updated the privacy page to describe Cloudflare and Resend processing and the optional resume flow.
- Preserved existing role, campaign, project, city, and Kelli-context prefilling while validating the submitted values again on the server.
- Improved the contact page at 320 px so the selector, fields, and security check stay inside the form card without horizontal scrolling.
Why
Bailey wanted optional resume submissions while reducing form-provider sprawl and keeping delivery credentials and recipient addresses out of public website code. The static Astro site remains static; the narrow form service is deployed and operated separately.
Files affected
src/pages/contact.astrosrc/pages/privacy.astroastro.config.mjssrc/scripts/verify-resend-contact-form.mjssrc/scripts/verify-bsu-job-fair.mjssrc/scripts/verify-content-aligned-visibility-and-contact-privacy.mjsworkers/contact-form/docs/operations/contact-form-service.md.projects/0002_resend_form/
Verification
- The Worker suite passes 99 tests, including all six schemas, Bailey-branded email rendering, routing, attachment validation, provider failures, Turnstile, request controls, and safe logging.
- Contact, job-fair, and privacy verifiers pass.
- The full Astro build completes successfully.
- Staging rejection probes confirm that bad origins, unsupported formats, unknown fields, invalid verification tokens, unsupported methods, and wrong paths do not send email.
- Browser checks confirm form switching and a no-overflow 320 px layout.
- A human-verified, no-resume careers submission completed through staging with the correct success state, private delivery, Reply-To behavior, message formats, and email authentication.
- A generated, non-personal PDF at the exact 5 MiB limit also completed through staging and arrived with its size, safe filename, and MIME type intact.
- A generated, non-personal DOCX completed through its separate validation path and arrived with the expected filename, Office document MIME type, and byte size.
- Controlled project, parcel-analysis, city-intelligence, IQ.Meet, and site-feedback submissions all reached the staging inbox with their fixed subjects, synthetic Reply-To addresses, text and HTML bodies, and passing SPF, DKIM, and DMARC.
- The branded template was deployed only to the isolated staging Worker. A post-deploy
GET /api/contactcheck returned the expected405without sending a message. - A controlled project inquiry then reached Gmail with the branded HTML intact, a readable plain-text fallback, the expected sender/subject/Reply-To behavior, and passing SPF, DKIM, and DMARC.
- Keyboard-only navigation reached the active feedback form in a logical order, skipped the hidden honeypot, and reached the submit button through the managed Turnstile widget.
- A forced local-network failure showed the retry message, preserved entered values, restored the submit button, and refreshed Turnstile without sending email. The refreshed managed token remained successful beyond five minutes through Cloudflare’s automatic token refresh.
- The source verifier now explicitly protects keyboard-skipped honeypots and the expired-token guidance/reset callback.
- A short invalid-token burst confirmed that Cloudflare’s approximate rate limiter is supplemental: all probes were rejected before email delivery, but no strict
429threshold appeared during the burst.
Release status
This work is staging-only. The Bailey production route and live static forms have not been changed. The delivery, attachment, keyboard, retry, and token-refresh gates pass; a separately approved production route and website cutover remain.