summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_http_route_addr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nxt_http_route_addr.c')
-rw-r--r--src/nxt_http_route_addr.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/nxt_http_route_addr.c b/src/nxt_http_route_addr.c
index 985fb737..34455af4 100644
--- a/src/nxt_http_route_addr.c
+++ b/src/nxt_http_route_addr.c
@@ -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;
}