| 41 | } |
| 42 | |
| 43 | void onFile(HttpRequest& request, HttpResponse& response) |
| 44 | { |
| 45 | String file = request.uri.getRelativePath(); |
| 46 | |
| 47 | if(file[0] == '.') |
| 48 | response.code = HTTP_STATUS_FORBIDDEN; |
| 49 | else { |
| 50 | response.setCache(86400, true); // It's important to use cache for better performance. |
| 51 | response.sendFile(file); |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | void startWebServer() |
| 56 | { |
nothing calls this directly
no test coverage detected