Add a non-capturing subgroup so that the function regex will match async functions as well.

Signed-off-by: Thomas E Lackey <telackey@bozemanpass.com>
This commit is contained in:
Thomas E Lackey 2018-08-14 10:13:40 -05:00 committed by Alex Ellis
parent 8749e0d891
commit b1846b842c

View File

@ -17,7 +17,7 @@ import (
)
// Parse out the service name (group 1) and rest of path (group 2).
var functionMatcher = regexp.MustCompile("^/?function/([^/?]+)([^?]*)")
var functionMatcher = regexp.MustCompile("^/?(?:async-)?function/([^/?]+)([^?]*)")
// HTTPNotifier notify about HTTP request/response
type HTTPNotifier interface {