return;
}
+ if (!strcasecmp(h->url, "/favicon.ico")) {
+ output_static(h);
+ return;
+ }
+
// Everything below this line is strictly REST URL patterns.
if (strncasecmp(h->url, HKEY("/ctdl/"))) { // Reject non-REST
char filename[PATH_MAX];
struct stat statbuf;
+ syslog(LOG_DEBUG, "static: %s", h->url);
+
if (!strncasecmp(h->url, "/ctdl/s/", 8)) {
snprintf(filename, sizeof filename, "static/%s", &h->url[8]);
}
else if (!strncasecmp(h->url, "/.well-known/", 13)) {
snprintf(filename, sizeof filename, "static/.well-known/%s", &h->url[13]);
}
+ else if (!strcasecmp(h->url, "/favicon.ico")) {
+ snprintf(filename, sizeof filename, "static/images/favicon.ico");
+ }
else {
do_404(h);
return;
// Display a room list in the main div.
//
function display_room_list() {
- document.getElementById("roomlist").innerHTML = "<img src=\"/ctdl/s/throbber.gif\" />"; // show throbber while loading
+ document.getElementById("roomlist").innerHTML = "<img src=\"/ctdl/s/static/throbber.gif\" />"; // show throbber while loading
fetch_room_list = async() => {
response = await fetch("/ctdl/r/");