| 61 | } |
| 62 | |
| 63 | void onFile(HttpRequest& request, HttpResponse& response) |
| 64 | { |
| 65 | String file = request.uri.getRelativePath(); |
| 66 | |
| 67 | if(file[0] == '.') |
| 68 | response.code = HTTP_STATUS_FORBIDDEN; |
| 69 | else { |
| 70 | response.setCache(86400, true); // It's important to use cache for better performance. |
| 71 | response.sendFile(file); |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | /// API /// |
| 76 |
nothing calls this directly
no test coverage detected