Skip to content

Commit bc4e982

Browse files
ihabadhamclaude
andcommitted
Trim renderer_password initializer comment
The previous comment restated in English what the code below already expressed. Cut to the one non-obvious WHY (why the prod branch exists despite Pro's own JS-side guard). Method names + the raise message cover the rest. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 3cf59a9 commit bc4e982

1 file changed

Lines changed: 3 additions & 11 deletions

File tree

config/initializers/react_on_rails_pro.rb

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,9 @@
1212

1313
config.renderer_url = ENV.fetch("RENDERER_URL", "http://localhost:3800")
1414

15-
# Must match the password in renderer/node-renderer.js.
16-
#
17-
# Dev/test: blank or unset falls back to the dev default, so .env.example's
18-
# literal `RENDERER_PASSWORD=` still works. `.presence` matches the JS
19-
# side's `||` fallback (which treats "" as falsy).
20-
#
21-
# Production: raise loudly if blank, unset, or still the dev default. The
22-
# Pro renderer's JS side guards against unset in production but accepts
23-
# the literal dev-default value. If someone set the CP secret to the
24-
# well-known dev password, both sides would "match" but renderer auth
25-
# would be effectively disabled. This closes that gap.
15+
# Must match the password in renderer/node-renderer.js. The JS side
16+
# guards against unset in production but accepts the literal dev
17+
# default; the prod branch here closes that gap.
2618
config.renderer_password =
2719
if Rails.env.local?
2820
ENV["RENDERER_PASSWORD"].presence || "local-dev-renderer-password"

0 commit comments

Comments
 (0)