(url: string)
| 92 | ) |
| 93 | |
| 94 | const toFilePath = (url: string) => { |
| 95 | let filePath = cleanUrl(url) |
| 96 | if (filePath.includes('%')) { |
| 97 | try { |
| 98 | filePath = decodeURI(filePath) |
| 99 | } catch { |
| 100 | /* malform uri */ |
| 101 | } |
| 102 | } |
| 103 | return normalizePath(filePath) |
| 104 | } |
| 105 | |
| 106 | // Keep the named function. The name is visible in debug logs via `DEBUG=connect:dispatcher ...` |
| 107 | return function viteServePublicMiddleware(req, res, next) { |
no test coverage detected