Skip to content

Security improvement suggested by ai#67

Open
Dominicpham03 wants to merge 1 commit intomasterfrom
dlp/security_enforcement
Open

Security improvement suggested by ai#67
Dominicpham03 wants to merge 1 commit intomasterfrom
dlp/security_enforcement

Conversation

@Dominicpham03
Copy link
Collaborator

REST requests (SecureHttpClient, RestImageUploadService) — API key now sent as X-API-Key header instead of in the URL. The URL itself is clean (/api/whoami.json
instead of /api/whoami.json?api_key=secret).
WebSocket connections — On native platforms (iOS/Android/desktop), the api_key query param is no longer added to the WebSocket URI. Authentication relies on the
Authorization: Bearer header that was already being passed but redundant. On web, we keep the query param as a fallback because browser WebSocket API
doesn't support custom headers.
Image loading — Instead of appending ?api_key=... to every image URL (which gets cached, logged, and visible in network tools), we pass X-API-Key via the
httpHeaders parameter on CachedNetworkImage, so the credential travels in headers only.

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.

1 participant