mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
allow google storage file (#1935)
This commit is contained in:
parent
9db01b6a30
commit
a5b0ecf4e8
@ -10,6 +10,10 @@ export function sanitizeUrl(url: string) {
|
||||
export const isGoogleUrl = (url: string): boolean => {
|
||||
if (!url || !isUrl(url)) return
|
||||
|
||||
const googleUrl = new URL(url)
|
||||
return googleUrl.hostname.endsWith('google.com')
|
||||
const urlString = new URL(url)
|
||||
const googleUrl = urlString.hostname.endsWith('google.com')
|
||||
const isGoogleStorage = urlString.hostname.endsWith(
|
||||
'storage.cloud.google.com'
|
||||
)
|
||||
return isGoogleStorage ? false : googleUrl
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user