
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
Vue directive to load and display secured images by custom headers. 基于 Vue 的权限图片获取查看,提供加载成功或失败回调。
一个显示有认证机制的图片的vue2指令
header字段,无限制数量v-auth-image指令 npm i vauthimage -S
import VAuthImage from 'vauthimage'
Vue.use(VAuthImage,{
// 默认图片,还未加载图片显示。[可选]
defaultSRC:'default.logo',
/**
* 默认请求headers,[可选],类似于
* { Authorization: "bearer xasdasdfasdfa", 'x-token': "x-token this is a x-token" } 的对象
*/
defaultHeaders:{
Authorization: "bearer this is a authorization"
},
// 动态获取到的headers,会与 defaultHeaders 覆盖合并。[可选]
getHeaders: getHeaders
})
function getHeaders(){
return {
'x-token': "x-token this is a x-token",
Authorization: "bearer this is a authorization2"
}
}
<template>
<img
v-auth-image="img_url"
v-auth-image:success="imageLoadSuccess"
v-auth-image:error="imageLoadError"
>
</template>
<script>
export default {
data () {
return {
imageUrl: 'http://xxx.xxx.png'
}
},
methods:{
imageLoadSuccess(e){
console.log('load success',e);
},
imageLoadError(e){
console.log('load error',e);
}
}
}
</script>
FAQs
Vue directive to load and display secured images by custom headers. 基于 Vue 的权限图片获取查看,提供加载成功或失败回调。
We found that authimage demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.