瀏覽代碼

add referer to a tag

ryoji-s 2 年之前
父節點
當前提交
75d0d4c696
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      apps/app/src/components/ReactMarkdownComponents/RichAttachment.tsx

+ 3 - 1
apps/app/src/components/ReactMarkdownComponents/RichAttachment.tsx

@@ -58,7 +58,9 @@ export const RichAttachment: React.FC<{
           </div>
           <div className="pl-0">
             <div className="d-inline-block">
-              <a target="_blank" rel="noopener noreferrer" href={filePathProxied}>
+              {/* Since we need to include the "referer" to view the attachment on the shared page
+              we should avoid using target="_blank" */}
+              <a rel="noopener" href={filePathProxied}>
                 {attachmentName || originalName}
               </a>
               <a className="ml-2 attachment-download" href={downloadPathProxied}>