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

Closed
shaokr opened this Issue Sep 19, 2018 · 2 comments

Comments

Projects
None yet
5 participants
@shaokr

shaokr commented Sep 19, 2018

  • I have searched the issues of this repository and believe that this is not a duplicate.

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:

@ant-design-bot

This comment has been minimized.

ant-design-bot commented Sep 19, 2018

Translation of this issue:


The ## Icon.createFromIconfontCN method will force the addition of https:

  • I have searched the issues of this repository and believe that this is not a duplicate.

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?

Adaptive http or https can be judged based on the passed scriptUrl.
This allows you to use the iconfont.cn project downloaded to your local or other cnd without https service.

What is actually happening?

Add https regardless of the value of scriptUrl:

@jiechud

This comment has been minimized.

Contributor

jiechud commented Sep 20, 2018

I want to solve this problem

afc163 added a commit that referenced this issue Sep 21, 2018

@afc163 afc163 closed this Sep 22, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment