santthosh / aws-es-kibana

AWS ElasticSearch Kibana Proxy
Apache License 2.0
323 stars 134 forks source link

Fix regex to parse endpoint in url with 2 letter country suffix #45

Closed adhulipa closed 6 years ago

adhulipa commented 6 years ago

I modfied the regex to exclude the match from the top level domain

I tested it out on https://regex101.com/ with the following input:

  1. some-cluster-identifier.cn-northwest-1.es.amazonaws.com.cn
  2. some-cluster-identifier.us-west-2.es.amazonaws.com

Earlier, the region in url 1. was not being parsed correctly

adhulipa commented 6 years ago

https://github.com/santthosh/aws-es-kibana/issues/46

santthosh commented 6 years ago

Thanks @adhulipa merging