Supporting UNIX sockets in address matching.
This closes #645 issue on GitHub. (Also moved a changelog line that was misplaced in a previous commit.)
This commit is contained in:
@@ -41,6 +41,16 @@ nxt_http_route_addr_pattern_parse(nxt_mp_t *mp,
|
||||
base->negative = 0;
|
||||
}
|
||||
|
||||
if (nxt_str_eq(&addr, "unix", 4)) {
|
||||
#if (NXT_HAVE_UNIX_DOMAIN)
|
||||
base->addr_family = AF_UNIX;
|
||||
|
||||
return NXT_OK;
|
||||
#else
|
||||
return NXT_ADDR_PATTERN_NO_UNIX_ERROR;
|
||||
#endif
|
||||
}
|
||||
|
||||
if (nxt_slow_path(addr.length < 2)) {
|
||||
return NXT_ADDR_PATTERN_LENGTH_ERROR;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user