fix(web): omit referrer when loading message images

Set no-referrer on message thumbnails and previews to prevent
QQ image requests from returning 400 and triggering ORB.

Add browser coverage for image loading and request headers.
This commit is contained in:
BiFangKNT
2026-10-21 12:03:00 +08:00
parent fc62f2ee13
commit 726ad5530f
3 changed files with 65 additions and 0 deletions
@@ -87,6 +87,7 @@ export function MessageContentRenderer({
<span key={index} className="inline-block align-middle mx-1">
<img
src={imageUrl}
referrerPolicy="no-referrer"
alt="Message attachment"
className="w-20 h-20 object-cover rounded cursor-pointer hover:opacity-80 transition-opacity border"
onClick={(e) => {
@@ -35,6 +35,7 @@ export default function ImagePreviewDialog({
{/* 图片 */}
<img
src={imageUrl}
referrerPolicy="no-referrer"
alt="Preview"
className="max-w-[50vw] max-h-[50vh] object-contain rounded-lg shadow-2xl bg-white"
onClick={(e) => e.stopPropagation()}