Skip to content

Commit 56a5487

Browse files
committed
Fix regex for AWS sub-subdomains #62
1 parent d066b82 commit 56a5487

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

iamlivecore/proxy.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ func createProxy(addr string) {
156156
proxy.OnRequest().DoFunc(func(req *http.Request, ctx *goproxy.ProxyCtx) (*http.Request, *http.Response) { // TODO: Move to onResponse for HTTP response codes
157157
body, _ := ioutil.ReadAll(req.Body)
158158

159-
isAWSHostname, _ := regexp.MatchString(`^.*\.amazonaws\.com(?:\.cn)?$`, req.Host)
159+
isAWSHostname, _ := regexp.MatchString(`^[^.]*\.amazonaws\.com(?:\.cn)?$`, req.Host)
160160
if isAWSHostname {
161161
handleAWSRequest(req, body, 200)
162162
}

0 commit comments

Comments
 (0)