引用本地svg 不显示 报跨域错误

image.png

<use xlink:href="img/myicons.svg#arrow" transform="scale(0.05)"/>

问题分析:
如果使用Chrome,它的安全模型将阻止本地文件引用不同目录中的其他文件。Firefox的安全模型允许本地文件引用其他本地文件,前提是引用的文件位于同一目录或引用者的子目录中。
If you're using Chrome it's security model prevents local files referring to other files in different directories. Firefox's security model allows local files to refer to other local files provided that the referenced file is in the same directory or a subdirectory of the referrer.

解决问题:
使用nginx代理