Relax constraint on aliases 67/23167/1
authorJose Bollo <jose.bollo@iot.bzh>
Mon, 2 Dec 2019 19:40:50 +0000 (20:40 +0100)
committerJosé Bollo <jose.bollo@iot.bzh>
Tue, 3 Dec 2019 17:51:51 +0000 (18:51 +0100)
Without relaxing constraint, it is impossible to alias
2 directory contents for the same prefix. Relaxing it
is needed for implementing ".well-known" interface.

Bug-AGL: SPEC-2968

Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
Change-Id: I339699bbe66ed3df74ed4ac92344646339e5f2ad

src/main-afb-daemon.c

index a8d99ff..f9c4ed4 100644 (file)
@@ -298,7 +298,7 @@ static int init_alias(void *closure, const char *spec)
        *path++ = 0;
        INFO("Alias for url=%s to path=%s", spec, path);
        return afb_hsrv_add_alias(hsrv, spec, afb_common_rootdir_get_fd(), path,
-                                 0, 0);
+                                 0, 1);
 }
 
 static int init_http_server(struct afb_hsrv *hsrv)