feat: add serveStatic middleware
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"message": "Hello from V-Hono static file server!",
|
||||
"file": "sample.json",
|
||||
"directory": "./uploads",
|
||||
"url_path": "/files",
|
||||
"timestamp": "2024-01-01T00:00:00Z",
|
||||
"features": {
|
||||
"path_traversal_protection": true,
|
||||
"auto_index_files": true,
|
||||
"etag_support": true,
|
||||
"last_modified_headers": true,
|
||||
"configurable_caching": true,
|
||||
"custom_headers": true,
|
||||
"content_type_detection": true
|
||||
},
|
||||
"content_types_supported": [
|
||||
"text/html",
|
||||
"text/css",
|
||||
"application/javascript",
|
||||
"application/json",
|
||||
"text/plain",
|
||||
"image/png",
|
||||
"image/jpeg",
|
||||
"image/gif",
|
||||
"image/svg+xml",
|
||||
"font/woff",
|
||||
"font/woff2",
|
||||
"application/pdf",
|
||||
"video/mp4",
|
||||
"audio/mpeg"
|
||||
],
|
||||
"security_features": [
|
||||
"Path traversal attack prevention",
|
||||
"Dot file access control",
|
||||
"Safe path validation",
|
||||
"Content-Type header injection protection"
|
||||
],
|
||||
"performance_features": [
|
||||
"ETag generation for caching",
|
||||
"Last-Modified headers",
|
||||
"Configurable cache control",
|
||||
"Efficient file reading"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user