mirror of
https://github.com/CFC-Servers/cfc_cl_http_whitelist.git
synced 2025-03-04 03:03:18 -05:00
add another filetype to the whitelist
This commit is contained in:
parent
3a2b30e4e0
commit
b0288d73ae
22
lua/cfc_http_restrictions/shared/filetypes/ftyp.lua
Normal file
22
lua/cfc_http_restrictions/shared/filetypes/ftyp.lua
Normal file
@ -0,0 +1,22 @@
|
||||
-- https://www.ftyps.com/what.html
|
||||
CFCHTTP.FileTypes.FTYP = {
|
||||
name = "ftyp",
|
||||
}
|
||||
local FTYP = CFCHTTP.FileTypes.FTYP
|
||||
|
||||
---@param body string
|
||||
---@return boolean
|
||||
function FTYP.IsFileData( body )
|
||||
body = string.sub( body, 5 ) -- discord size bytes
|
||||
if not string.StartsWith( body, "ftyp" ) then return false end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
---@param _ string
|
||||
---@return string[] urls
|
||||
---@return string|nil error
|
||||
function FTYP.GetURLSFromData( _ )
|
||||
-- we want to ignore urls in FTYP containers
|
||||
return {}, nil
|
||||
end
|
Loading…
Reference in New Issue
Block a user