-
-
Notifications
You must be signed in to change notification settings - Fork 49.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Icon.createFromIconfontCN方法会强制添加https: #12316
Comments
Translation of this issue: The ## Icon.createFromIconfontCN method will force the addition of https:
Version3.9.2 Steps to reproduceImport { Icon } from 'antd'; What is expected?Adaptive http or https can be judged based on the passed scriptUrl. What is actually happening?Add https regardless of the value of scriptUrl: |
I want to solve this problem |
Version
3.9.2
Steps to reproduce
import { Icon } from 'antd';
let scriptUrl =
./icon/iconfont.js
;if (DEV) {
scriptUrl = '//at.alicdn.com/t/font_810467_0vb7rjfqkwzk.js';
}
export default Icon.createFromIconfontCN({
scriptUrl
});
What is expected?
可根据传入的scriptUrl判断自适应http或者https,
这样就可使用下载到本地或者其他cnd中无https服务的 iconfont.cn 项目
What is actually happening?
不管scriptUrl的值传什么都会添加https:
The text was updated successfully, but these errors were encountered: