Closed clguo-tw closed 2 years ago
I also can't get any host_regex
to work. If I use a host
that is a regex, I get the above. If it's a plain string, there's no error in the Ambassador logs, but the mapping doesn't work. Almost as if host_regex
is being ignored.
Same here, I tried different host
with host_regex: true
, it seems the host check is ignored.
Maybe I missed it but I don't find a clear documentation about host
and host_regex
.
EDIT: found the doc but it does not really help, still seem to have the bug after different tries. The doc shows prefix: /backend
and tells all /
requests will be forwarded, does this mean the prefix is ignored when using a host?
With version 2.x there are some changes to this. Please see this docs page for details (noted below). Please let us know if issues persist on 2.x.
A getambassador.io/v3alpha1 Mapping
will honor host
and host_regex
as a transition aid, but host
and host_regex
are deprecated in favor of hostname
.
A Mapping
that specifies host_regex: true
will be associated with all Host
s. This is generally far less desirable than using hostname
with a DNS glob.
Hi, I try use host_regex in my mapping, i got error as below
level=warning msg="Could not parse host '^api-dev(\\.internal)?\\.example\\.com$' in Mapping 'example-api': using empty host" func=github.com/datawire/apro/cmd/amb-sidecar/devportal/server.NewMappingFromJSON file="github.com/datawire/apro/cmd/amb-sidecar/devportal/server/mappings.go:95