leslie-tsang commented on issue #267: URL: https://github.com/apache/apisix-docker/issues/267#issuecomment-1017070894
> > seems like the `resty-etcd` use a regular to check the etcd url, and the rule will reject the char `-` > > https://github.com/api7/lua-resty-etcd/blob/f75f4c551b048e00233df38ab725b46218b35de9/lib/resty/etcd/v3.lua#L240 > > ```lua > > for _, host in ipairs(http_hosts) do > > local m, err = re_match(host, > > [=[([^\/]+):\/\/([\da-zA-Z.-]+|\[[\da-fA-F:]+\]):?(\d+)?$]=], "jo") > > if not m then > > return nil, "invalid http host: " .. host .. ", err: " .. (err or "not matched") > > end > > ``` > > > > > > > > > > > > > > > > > > > > > > > > maybe try with `mf-etcd` instead > > Oh, yes, and actually `_` is not a valid char in the domain. Cool, After reading of [RFC1123](https://www.ietf.org/rfc/rfc1123.html#section-2) and [RFC952](https://www.ietf.org/rfc/rfc952.html), I'm wondering if we should use it as a `DNS domain` or `Host` ? > RFC-1123 ```html The DNS itself places only one restriction on the particular labels that can be used to identify resource records. That one restriction relates to the length of the label and the full name. The length of any one label is limited to between 1 and 63 octets. A full domain name is limited to 255 octets (including the separators). The zero length full name is defined as representing the root of the DNS tree, and is typically written and displayed as ".". Those restrictions aside, any binary string whatever can be used as the label of any resource record. Similarly, any binary string can serve as the value of any record that includes a domain name as some or all of its value (SOA, NS, MX, PTR, CNAME, and any others that may be added). Implementations of the DNS protocols must not place any restrictions on the labels that can be used. In particular, DNS servers must not refuse to serve a zone because it contains labels that might not be acceptable to some DNS client programs. A DNS server may be configurable to issue warnings when loading, or even to refuse to load, a primary zone containing labels that might be considered questionable, however this should not happen by default. ``` > RFC-952 define ```html B. Lexical grammar <entry-field> ::= <entry-text> [<cr><lf> <blank> <entry-field>] <entry-text> ::= <print-char> *<text> <blank> ::= <space-or-tab> [<blank>] <keyword> ::= NET | GATEWAY | HOST | DOMAIN <hname> ::= <name>*["."<name>] <name> ::= <let>[*[<let-or-digit-or-hyphen>]<let-or-digit>] ``` If we use it as an hostname, we should avoid `_` in the config. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
