You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to propose a change in the way SVG icons are loaded in the S2 library. Currently, SVG icons are embedded using the data:image format. While this approach is convenient, it poses a challenge for applications that have a strict Content Security Policy (CSP) in place, specifically when the image-src 'self' directive is used.
The data:image format is not compatible with the image-src 'self' directive, leading to issues where SVG icons fail to load unless the CSP is relaxed. However, weakening the CSP configuration is not a desirable solution due to security concerns.
To address this, I suggest modifying the process of loading SVG icons in a way that is compatible with strict CSP settings.
Implementing this change would enhance the library's compatibility with secure web applications and allow developers to maintain robust CSP configurations without compromising on functionality.
Design the API / API 设计
name
type
default
description
-
-
-
-
Are you willing to contribute? / 是否愿意参与贡献?
Please select / 请选择
The text was updated successfully, but these errors were encountered:
Thank you for your suggestion regarding the change in SVG icon loading format in the S2 library. Your proposal to modify the process to be compatible with strict Content Security Policy (CSP) settings is noted. This change could indeed enhance the library's compatibility with secure web applications, allowing developers to maintain robust CSP configurations without compromising functionality.
Your feature request will be considered by the team. If you have any further questions or need assistance, feel free to reach out.
🪧 Tips
For further assistance, please describe your question in the comments and @petercat-assistant to start a conversation with me.
Describe the feature / 功能描述
Hello,
I would like to propose a change in the way SVG icons are loaded in the S2 library. Currently, SVG icons are embedded using the
data:image
format. While this approach is convenient, it poses a challenge for applications that have a strict Content Security Policy (CSP) in place, specifically when theimage-src 'self'
directive is used.The
data:image
format is not compatible with theimage-src 'self'
directive, leading to issues where SVG icons fail to load unless the CSP is relaxed. However, weakening the CSP configuration is not a desirable solution due to security concerns.To address this, I suggest modifying the process of loading SVG icons in a way that is compatible with strict CSP settings.
Implementing this change would enhance the library's compatibility with secure web applications and allow developers to maintain robust CSP configurations without compromising on functionality.
Design the API / API 设计
Are you willing to contribute? / 是否愿意参与贡献?
Please select / 请选择
The text was updated successfully, but these errors were encountered: