summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/rest-api.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rest-api.c b/src/rest-api.c
index 0c44a43e..dd5c59b9 100644
--- a/src/rest-api.c
+++ b/src/rest-api.c
@@ -508,8 +508,8 @@ ProcessApiCall:
// client did not pass token on URI let's use cookies
if ((!request->restfull) && (request->context != NULL)) {
- char cookie[64];
- snprintf (cookie, sizeof (cookie), "%s=%s;path=/api;max-age=%d", COOKIE_NAME, request->uuid, request->config->cntxTimeout);
+ char cookie[256];
+ snprintf (cookie, sizeof (cookie), "%s=%s;path=%s;max-age=%d", COOKIE_NAME, request->uuid, request->config->rootapi,request->config->cntxTimeout);
MHD_add_response_header (webResponse, MHD_HTTP_HEADER_SET_COOKIE, cookie);
}