Socket
Socket
Sign inDemoInstall

cors-image

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    cors-image

showing the cors image for vue


Version published
Weekly downloads
3
increased by200%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

cors-image

经常碰见一些图片被CORS, 因为请求头中新增了 cross-origin-resource-policy: same-origin, 导致直接img或者背景图无法显示。

install 安装

npm install cors-image --save

usage 使用

import corsImage from "cors-image"
Vue.use(corsImage.vue)

tip 说明

  1. 如果请求头中x-frame-options: SAMEORIGIN,那就彻底凉凉了
  2. 性能不好,可能会造成滑动卡顿
  3. 暂时只有vue版本,react版本稍后发布
  4. 移动端上显示可能有问题,暂时无法解决

Keywords

FAQs

Last updated on 29 Apr 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc