Skip to content

docs(env): add CRON_SECRET to both .env.example files - #277

Merged
gkhngyk merged 1 commit into
ansvisor:mainfrom
P-Maheswari:fix/add-cron-secret-to-env-examples
Jun 19, 2026
Merged

gkhngyk merged 1 commit into
ansvisor:mainfrom
P-Maheswari:fix/add-cron-secret-to-env-examples

Conversation

@P-Maheswari

Copy link
Copy Markdown
Contributor

Fixes #244. CRON_SECRET guards three internal server endpoints but was missing from both example files, causing silent 401s in cloud deployments. Added with a comment explaining it is cloud-only and must be set to the same value on both the web app and the server.

Summary

Added CRON_SECRET to both .env.example files with a descriptive comment.
Without this entry, cloud operators have no indication they need to set this
variable, causing permanent 401s on three internal endpoints and failures in
daily tracking, content-brief generation, and post-checkout tracking.

Related issue

Closes #244

Type of change

  • feat — New feature
  • fix — Bug fix
  • chore — Maintenance / dependencies
  • docs — Documentation only
  • refactor — Code change that neither fixes a bug nor adds a feature
  • test — Adding or updating tests

Checklist

  • Branch follows the naming convention (feature/, fix/, chore/, docs/) — see CONTRIBUTING.md
  • Commits follow Conventional Commits
  • yarn lint passes (run from web/)
  • yarn typecheck passes (run from web/)
  • yarn format:check passes (run from web/)
  • Changes are focused — one concern per PR

lint, typecheck, format:check skipped — docs/config only change, no source files modified.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welcome to Ansvisor, and thank you for your first PR! A maintainer will be by soon to review.

In the meantime, two things that make review faster:

  • A short description of why the change matters, not just what it does — most of our PRs link a Fixes #... to the issue that explains the why.
  • A quick local test note if there's anything worth eyeballing in the browser.

If you'd like to keep an eye on where Ansvisor goes next, a ⭐ on the repo helps others discover it (and Watch sends you a ping when related issues land). Either way — looking forward to your next one.

Fixes ansvisor#244. CRON_SECRET guards three internal server endpoints but was
missing from both example files, causing silent 401s in cloud deployments.
Added with a comment explaining it is cloud-only and must be set to the
same value on both the web app and the server.
@P-Maheswari
P-Maheswari force-pushed the fix/add-cron-secret-to-env-examples branch from 48e8fee to 62be42a Compare June 19, 2026 06:59

@gkhngyk gkhngyk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified against the code — all three internal endpoints (/api/internal/daily-tracking, /api/internal/content/:id/brief, /api/internal/trigger-tracking) are guarded by CRON_SECRET, and it was indeed missing from both example files. The comments are accurate and the cloud-only framing is spot on. Thanks @P-Maheswari! 🙏

@gkhngyk
gkhngyk merged commit 9fb33d7 into ansvisor:main Jun 19, 2026
@P-Maheswari
P-Maheswari deleted the fix/add-cron-secret-to-env-examples branch June 22, 2026 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs(env): CRON_SECRET missing from .env.example (internal endpoints 401 in cloud)

2 participants