1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

vweb: fix vweb static url (#15396)

This commit is contained in:
yuyi 2022-08-11 13:28:47 +08:00 committed by GitHub
parent 32fa475316
commit 275a997ec1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -622,7 +622,7 @@ fn (mut ctx Context) scan_static_directory(directory_path string, mount_path str
// Rudimentary guard against adding files not in mime_types.
// Use serve_static directly to add non-standard mime types.
if ext in vweb.mime_types {
ctx.serve_static(mount_path + '/' + file, full_path)
ctx.serve_static(mount_path.trim_right('/') + '/' + file, full_path)
}
}
}