simple-image
simple-image copied to clipboard
Feature request: An option to allow only https
We don't want to allow someone to add images to non secure urls.
This should be the default IMO, and if someone wants to allow it, they can enable allowHttp or something along those lines.
You can fork this repo and modify the paste regex pattern:
Default:
static get pasteConfig() {
return {
patterns: {
image: /https?:\/\/\S+\.(gif|jpe?g|tiff|png|webp)$/i,
},
tags: ['img'],
files: {
mimeTypes: ['image/*'],
},
};
}
Allow only https:
static get pasteConfig() {
return {
patterns: {
image: /https:\/\/\S+\.(gif|jpe?g|tiff|png|webp)$/i,
},
tags: ['img'],
files: {
mimeTypes: ['image/*'],
},
};
}