mirror of
https://github.com/CFC-Servers/cfc_cl_http_whitelist.git
synced 2025-03-04 03:03:18 -05:00
add id3 filetype
This commit is contained in:
parent
ceda1ebc83
commit
907c615594
@ -12,13 +12,6 @@ function HTML.IsFileData( _body )
|
||||
return false
|
||||
end
|
||||
|
||||
---@param url string
|
||||
---@return boolean
|
||||
function HTML.IsFileURL( url )
|
||||
if string.EndsWith( url, "." .. HTML.extension ) then return true end
|
||||
return false
|
||||
end
|
||||
|
||||
---@param body string
|
||||
---@return string[] urls
|
||||
---@return string|nil error
|
||||
|
24
lua/cfc_http_restrictions/shared/filetypes/id3.lua
Normal file
24
lua/cfc_http_restrictions/shared/filetypes/id3.lua
Normal file
@ -0,0 +1,24 @@
|
||||
CFCHTTP.FileTypes.ID3 = {
|
||||
name = "ID3",
|
||||
allowed = true,
|
||||
maxFileSize = 0,
|
||||
}
|
||||
local ID3 = CFCHTTP.FileTypes.ID3
|
||||
|
||||
---@param body string
|
||||
---@return boolean
|
||||
function ID3.IsFileData( body )
|
||||
if not string.StartsWith( body, "ID3" ) then return false end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
---@param _ string
|
||||
---@return string[] urls
|
||||
---@return string|nil error
|
||||
function ID3.GetURLSFromData( _ )
|
||||
-- we want to ignore urls in ID3 container metadata
|
||||
return {}, nil
|
||||
end
|
||||
|
||||
return ID3
|
@ -15,13 +15,6 @@ function M3U.IsFileData( body )
|
||||
return false
|
||||
end
|
||||
|
||||
---@param url string
|
||||
---@return boolean
|
||||
function M3U.IsFileURL( url )
|
||||
if string.EndsWith( url, "." .. M3U.extension ) then return true end
|
||||
return false
|
||||
end
|
||||
|
||||
---@param _ string
|
||||
---@return string[] urls
|
||||
---@return string|nil error
|
||||
|
@ -13,13 +13,6 @@ function PLS.IsFileData( body )
|
||||
return false
|
||||
end
|
||||
|
||||
---@param url string
|
||||
---@return boolean
|
||||
function PLS.IsFileURL( url )
|
||||
if string.EndsWith( url, "." .. PLS.extension ) then return true end
|
||||
return false
|
||||
end
|
||||
|
||||
---@param _body string
|
||||
---@return string[] urls
|
||||
---@return string|nil error
|
||||
|
Loading…
Reference in New Issue
Block a user