You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by ju...@apache.org on 2022/09/08 14:19:08 UTC

[apisix-website] branch master updated: feat: ignore wrong ext CDN images (#1317)

This is an automated email from the ASF dual-hosted git repository.

juzhiyuan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-website.git


The following commit(s) were added to refs/heads/master by this push:
     new 9bc7cd32854 feat: ignore wrong ext CDN images (#1317)
9bc7cd32854 is described below

commit 9bc7cd328547958afe61365e4f03b9b6cf1be882
Author: Young <is...@outlook.com>
AuthorDate: Thu Sep 8 22:19:02 2022 +0800

    feat: ignore wrong ext CDN images (#1317)
---
 blog/src/theme/BlogPostPage/index.tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/blog/src/theme/BlogPostPage/index.tsx b/blog/src/theme/BlogPostPage/index.tsx
index 1f5b1d24ba0..cca937f48c8 100644
--- a/blog/src/theme/BlogPostPage/index.tsx
+++ b/blog/src/theme/BlogPostPage/index.tsx
@@ -43,7 +43,7 @@ const imgPropsParse = (
   } = props;
   const isFromCDN = src?.includes('static.apis');
 
-  if (!isFromCDN || !src) {
+  if (!isFromCDN || !src || !['png', 'jpg', 'jpeg'].some((s) => src.endsWith(s))) {
     return props;
   }