... <img id="notFound" src="/ressources/404.png" alt="404notFound"> ...
SKYLARK(RessourcesHandler, "/ressources/*"){ if(http[0].Find(".png") != -1){ http.SetHeader("Cache-Control","public"); http.ContentType("image/png") << LoadFile(GetFilePath("ressources/img/" +http[0])); }else if(http[0].Find(".css")!= -1){ http.SetHeader("Cache-Control","public"); http.ContentType("text/css") << LoadFile(GetFilePath("ressources/css/" +http[0])); }else if(http[0].Find("fonts")!= -1){ http.SetHeader("Cache-Control","public"); http.ContentType("text/css") << LoadFile(GetFilePath("ressources/fonts/" +http[0])); }else if(http[0].Find(".js")!= -1){ http.SetHeader("Cache-Control","public"); http.ContentType("text/javascript") << LoadFile(GetFilePath("ressources/js/" +http[0])); }else{ http.Response(404,"File not found"); } }
Report message to a moderator