-
Notifications
You must be signed in to change notification settings - Fork 509
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
feat(Avatar): add referrerpolicy
prop to img tag
#392
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
referrerpolicy
prop to img tag
@@ -32,6 +39,10 @@ export default defineComponent({ | |||
type: String, | |||
default: null | |||
}, | |||
referrerpolicy: { | |||
type: String as PropType<'no-referrer' | 'no-referrer-when-downgrade' | 'origin' | 'origin-when-cross-origin' | 'same-origin' | 'strict-origin' | 'strict-origin-when-cross-origin' | 'unsafe-url'>, | |||
default: () => 'strict-origin-when-cross-origin' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why set a default here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Going off of the mdn docs. I just checked this out and looks like even when the props is null or undefined, the default is still part of the headers request.
Just thought about this and there are lots of other properties that we can pass to an |
Will setup a clean pr for it, then close this one after |
Hi @sduduzog and @benjamincanac, thanks for the great work. Another case where we might need to add an attribute to the image tag is when there's a need to set a value for the A recommended fix when using the security module and fetching images from external links. More here Baroshem/nuxt-security#138 (comment) |
Closing in favour of #421 @03balogun with the new PR, both our issues will be resolved |
Closes #351
I'm not sure about my choice with the inline PropType, seeing its width, keen on styling commentry fitting to the project.