- Add a WebDAV server implementation using the `vweb` framework. - The server supports basic authentication, request logging, and essential WebDAV methods. - Implements file operations, authentication, and request logging. Co-authored-by: mahmmoud.hassanein <mahmmoud.hassanein@gmail.com>
14 lines
358 B
V
14 lines
358 B
V
module webdav
|
|
|
|
import vweb
|
|
import freeflowuniverse.herolib.ui.console
|
|
|
|
fn logging_middleware(mut ctx vweb.Context) bool {
|
|
console.print_green('=== New Request ===')
|
|
console.print_green('Method: ${ctx.req.method.str()}')
|
|
console.print_green('Path: ${ctx.req.url}')
|
|
console.print_green('Headers: ${ctx.req.header}')
|
|
console.print_green('')
|
|
return true
|
|
}
|