Fix bugs
This commit is contained in:
parent
a64817cea1
commit
650f79d0fd
2 changed files with 4 additions and 3 deletions
|
|
@ -14,6 +14,8 @@ module.exports = async (ctx: Koa.Context) => {
|
|||
|
||||
function wrap(url: string): string {
|
||||
return url != null
|
||||
? `https://images.weserv.nl/?url=${url.replace(/^https?:\/\//, '')}`
|
||||
? url.startsWith('https://')
|
||||
? url
|
||||
: `https://images.weserv.nl/?url=${url.replace(/^http:\/\//, '')}`
|
||||
: null;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue