Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
webui: allow access to imagecache also to streaming clients (like hts…
…p for icons)
  • Loading branch information
perexg committed Oct 2, 2014
1 parent 797b033 commit e3762f1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/webui/webui.c
Expand Up @@ -1274,6 +1274,11 @@ page_imagecache(http_connection_t *hc, const char *remain, void *opaque)
if(remain == NULL)
return 404;

if(hc->hc_access == NULL ||
(access_verify2(hc->hc_access, ACCESS_WEB_INTERFACE) &&
access_verify2(hc->hc_access, ACCESS_STREAMING)))
return 405;

if(sscanf(remain, "%d", &id) != 1)
return HTTP_STATUS_BAD_REQUEST;

Expand Down Expand Up @@ -1352,7 +1357,7 @@ webui_init(int xspf)

http_path_add("/stream", NULL, http_stream, ACCESS_STREAMING);

http_path_add("/imagecache", NULL, page_imagecache, ACCESS_WEB_INTERFACE);
http_path_add("/imagecache", NULL, page_imagecache, ACCESS_ANONYMOUS);

webui_static_content("/static", "src/webui/static");
webui_static_content("/docs", "docs/html");
Expand Down

0 comments on commit e3762f1

Please sign in to comment.