Repository navigation
Contact: Resend email delivery + fallback address - #6
Merged
Merged
Conversation
The enquiry route accepted only a bearer-token webhook, and none was configured in production, so every real submission ended in a 503 with no other way to reach us. This adds a second delivery mode that emails each enquiry through Resend (RESEND_API_KEY + ENQUIRY_INBOX, optional ENQUIRY_FROM), keeps the webhook as the preferred mode when both are set, and still fails closed without a shared rate limiter. hello@ghimtech.org now appears in the contact aside, the footer, and under any failed-submission status so visitors always have a channel. Tests: 21 passing (4 new for Resend mode, precedence, and fail-closed).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…g secret The Upstash integration installed through the Vercel Marketplace injects KV_REST_API_URL and KV_REST_API_TOKEN rather than the UPSTASH_REDIS_REST_* names. Accept either pair. When RATE_LIMIT_SECRET is unset, derive the key-hashing secret from the Redis token instead of failing closed: the token already grants full access to the keys it would protect.
durga710
added a commit
that referenced
this pull request
Sep 13, 2026
… delivery - Prettier: reformat the enquiry route and its tests (CI format:check was failing on main since #6). - Serve a real /favicon.ico (16/32/48 PNG-in-ICO rendered from icon.svg) so legacy user agents and link previews stop hitting a 404. - README: document Resend delivery, the Marketplace KV variable names, the optional hashing secret, and the correct Vercel root directory. - Release notes: delivery gate reflects the two delivery modes.
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Production had no enquiry receiver configured, so the contact form returned 503 on every real submission and the site showed no email address anywhere.
What
POST /api/projectgains a Resend delivery mode (RESEND_API_KEY,ENQUIRY_INBOX, optionalENQUIRY_FROM). Webhook mode still wins when both are set; the route still fails closed without the shared rate limiter.KV_REST_API_URL/KV_REST_API_TOKEN) as well asUPSTASH_REDIS_REST_*.RATE_LIMIT_SECRETis now optional and derived from the Redis token when unset.reply_toset to the enquirer and a SHA-256Idempotency-Keyso client retries do not duplicate.hello@ghimtech.orgis shown in the contact aside, the footer, and beneath any failed-submission status..env.exampledocuments both delivery options.Verification
node --test: 22 passing (5 new).tsc --noEmitandnext buildclean.Already done in Vercel
Upstash Redis
upstash-kv-bole-forest(Free plan) is connected toghim-techfor Production and Preview with theKV_prefix.After merge
Add
RESEND_API_KEYandENQUIRY_INBOXto Production environment variables, then redeploy.