Skip to content

Commit

Permalink
dont log html urls if 0 urls present in data
Browse files Browse the repository at this point in the history
  • Loading branch information
plally committed Sep 13, 2023
1 parent fdbdfa9 commit ceda1eb
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions lua/cfc_http_restrictions/wraps/html.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,15 @@ local function wrapHTMLPanel( panelName )

return url
end )
CFCHTTP.LogRequest( {
noisy = true,
method = "GET",
fileLocation = stack[3],
urls = logUrls,
} )

if #logUrls > 0 then
CFCHTTP.LogRequest( {
noisy = true,
method = "GET",
fileLocation = stack[3],
urls = logUrls,
} )
end

return _G[setHTML]( self, html, ... )
end
Expand All @@ -57,12 +60,14 @@ local function wrapHTMLPanel( panelName )
return url
end )

CFCHTTP.LogRequest( {
noisy = true,
method = "GET",
fileLocation = stack[3],
urls = logUrls,
} )
if #logUrls > 0 then
CFCHTTP.LogRequest( {
noisy = true,
method = "GET",
fileLocation = stack[3],
urls = logUrls,
} )
end

return _G[runJavascript]( self, js )
end
Expand Down

0 comments on commit ceda1eb

Please sign in to comment.