Skip to content

Commit 309465b

Browse files
committed
Enable PCRE-JIT compilation of regular expressions.
1 parent f60f359 commit 309465b

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
### Changed
66
- Eliminate dependency on GNU version of the `date` command line utility to improve compatibility with Alpine Linux, BSDs, and others. Fixes warnings that may have started getting logged in v0.13.0. [#195](https://github.com/GUI/lua-resty-auto-ssl/issues/195)
7+
- Enable PCRE-JIT compilation of regular expressions used in code.
78

89
## 0.13.0 - 2019-09-30
910

lib/resty/auto-ssl/servers/challenge.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
return function(auto_ssl_instance)
66
-- Extract the dynamic token filename part out of the URL path.
77
local path = ngx.var.request_uri
8-
local matches, match_err = ngx.re.match(path, "/([A-Za-z0-9\\-_]+)$")
8+
local matches, match_err = ngx.re.match(path, "/([A-Za-z0-9\\-_]+)$", "jo")
99
if not matches or not matches[1] then
1010
ngx.exit(ngx.HTTP_NOT_FOUND)
1111
elseif match_err then

lib/resty/auto-ssl/storage_adapters/file.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ function _M.keys_with_suffix(self, suffix)
8181

8282
local keys = {}
8383
for path in string.gmatch(result["output"], "[^\r\n]+") do
84-
local filename = ngx.re.sub(path, ".*/", "")
84+
local filename = ngx.re.sub(path, ".*/", "", "jo")
8585
local key = ngx.unescape_uri(filename)
8686
table.insert(keys, key)
8787
end

0 commit comments

Comments
 (0)