mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-11-16 13:00:55 +00:00
* 🪧 fix: Emit the Configured-Footer Answer With the HTML Shell The chat surface lays out against whether the deployment configured a footer (customFooter, privacy policy, terms of service). The client answered that from localStorage — whatever the last resolved `/api/config` recorded — so the answer was a guess on a first-ever visit and could be stale for a deployment whose configuration changed. The backend already knows when it serves client/dist/index.html, so it says so there: `injectConfiguredFooterBootstrap` writes `hasConfiguredFooter` into `window.__LIBRECHAT_CONFIG__` ahead of the app's own scripts, once at boot from the base app config, and the client reads it on its first render instead of remembering the last answer. The `configured-footer` storage atom is gone. Client and server share one predicate (`hasConfiguredFooter` in librechat-data-provider) so the two cannot disagree, and the shell injection is generalized (`injectBootstrapConfig`), with the query-devtools flag now going through it. * 🧷 fix: Keep Bootstrap Values Literal and State the Shell's Contract `injectBootstrapConfig` passed its script as a replacement string, so a `$&`, `$1` or `$'` inside an injected value was expanded by `String.replace` instead of reaching the client. Both insertion points take a replacement function now, and the spec reads its values back off the global through an explicit result type rather than an unchecked dictionary. The shell answers from the deployment's own configuration, which a per-tenant, role or user override of `interface.privacyPolicy` or `termsOfService` can disagree with — `/api/config` resolves the caller's and the client prefers it. That contract was overstated in three comments ("a deployment-lifetime fact", "the same one the config will give"); they now say what the answer is and what resolves the rest. Two scenarios cover the disagreement end to end: a document served without the answer, and a policy link only this caller's config carries. |
||
|---|---|---|
| .. | ||
| src | ||
| types | ||
| .gitignore | ||
| babel.config.cjs | ||
| jest.config.mjs | ||
| jest.setup.cjs | ||
| package.json | ||
| tsconfig-paths-bootstrap.mjs | ||
| tsconfig.build.json | ||
| tsconfig.json | ||
| tsconfig.spec.json | ||
| tsdown.config.mjs | ||