fix faulty if statement and replace the DECO_RELOAD_TOKEN to DECO_RELEASE_RELOAD_TOKEN#1174
Conversation
Tagging OptionsShould a new tag be published when this PR is merged?
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (3)
📝 WalkthroughWalkthroughThe reload endpoint's authorization now requires the token from Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
The
/.decofile/reloadendpoint previously failed open when no token was configured — any unauthenticated POST could replace the running site's entire decofile. This PR closes that gap and aligns the env var name with what the operator already sends.Changes
Summary by cubic
Secure the
/.decofile/reloadendpoint by enforcing token auth even when no env var is set. Bumps@deco/deco,@deco/dev, and@deco/scriptsto 1.196.2-beta.Bug Fixes
DECO_RELEASE_RELOAD_TOKENis unset or theAuthorizationheader is missing/invalid, return 401.DECO_RELOAD_TOKENtoDECO_RELEASE_RELOAD_TOKENto align with the operator.Migration
DECO_RELEASE_RELOAD_TOKENin your environment/secret./.decofile/reloadwithAuthorization: Bearer <token>.DECO_RELOAD_TOKEN.Written for commit 87b8b53. Summary will update on new commits. Review in cubic
Summary by CodeRabbit