mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-19 09:50:15 +01:00
🔍 refactor: OpenID Fetch Handling and Logging (#7790)
* feat: Enhance OpenID Strategy with Debug Logging and Header Management - Added detailed logging for OpenID requests and responses when debug mode is enabled. - Introduced helper functions for safely logging sensitive data and headers. - Updated OpenID strategy to handle non-standard WWW-Authenticate headers in responses. - Refactored proxy configuration handling for improved clarity and logging. * refactor: MemoryViewer Layout with Conditional Justification - Updated the MemoryViewer component to conditionally apply justification styles based on memory data and access permissions. - Introduced utility function `cn` for cleaner class name management in the component. * refactor: Update OpenID Strategy to use Global Fetch * refactor: Add undici for customFetch request handling in OpenID strategy * fix: Export 'files' module in utils index * chore: Add node-fetch dependency for openid image download * ci: Add comprehensive tests for multer configuration and file handling - Introduced a new test suite for multer configuration, covering storage destination and filename generation. - Implemented tests for file filtering, ensuring only valid JSON files are accepted. - Added error handling tests for edge cases and vulnerabilities, including handling empty field names and malformed filenames. - Integrated real configuration testing with actual fileConfig and custom endpoints. - Enhanced UUID generation tests to ensure uniqueness and cryptographic security. * chore: Improve proxy configuration logging in customFetch function * fix: Improve logging for non-standard WWW-Authenticate header in customFetch function
This commit is contained in:
parent
b0054c775a
commit
272522452a
7 changed files with 719 additions and 9 deletions
|
|
@ -34,6 +34,7 @@ import MemoryCreateDialog from './MemoryCreateDialog';
|
|||
import MemoryEditDialog from './MemoryEditDialog';
|
||||
import { useToastContext } from '~/Providers';
|
||||
import AdminSettings from './AdminSettings';
|
||||
import { cn } from '~/utils';
|
||||
|
||||
export default function MemoryViewer() {
|
||||
const localize = useLocalize();
|
||||
|
|
@ -251,7 +252,12 @@ export default function MemoryViewer() {
|
|||
</div>
|
||||
{/* Memory Usage and Toggle Display */}
|
||||
{(memData?.tokenLimit || hasOptOutAccess) && (
|
||||
<div className="flex items-center justify-between rounded-lg">
|
||||
<div
|
||||
className={cn(
|
||||
'flex items-center rounded-lg',
|
||||
memData?.tokenLimit != null && hasOptOutAccess ? 'justify-between' : 'justify-end',
|
||||
)}
|
||||
>
|
||||
{/* Usage Display */}
|
||||
{memData?.tokenLimit && (
|
||||
<div className="flex items-center gap-2">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue