We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 27a5539 commit d6fc6b8Copy full SHA for d6fc6b8
lib/cors.lua
@@ -57,8 +57,7 @@ M.build_pattern = function(pattern)
57
end
58
59
-- escape dots and dashes in pattern
60
- pattern = pattern:gsub("%.", "%%.")
61
- pattern = pattern:gsub("%-", "%%-")
+ pattern = pattern:gsub("([%.%-])", "%%%1")
62
63
-- an asterisk for the port means allow all ports
64
if string.find(pattern, "[:]+%*$") ~= nil then
0 commit comments