Fixed duplicated phrase

This commit is contained in:
Paweł Kierski 2023-04-10 20:15:57 +02:00 committed by GitHub
parent 724e77fc0c
commit 564e41eaff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,7 +29,7 @@ type uiAssetsHandler struct {
// serve the file specified by the URL path. // serve the file specified by the URL path.
func (h *uiAssetsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { func (h *uiAssetsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
// Get the absolute path to prevent directory traversal. // Get the absolute path to prevent directory traversal.
path := filepath.filepath.ToSlash(filepath.Clean(r.URL.Path)) path := filepath.ToSlash(filepath.Clean(r.URL.Path))
// Get the path relative to the root path. // Get the path relative to the root path.
if !strings.HasPrefix(path, h.rootPath) { if !strings.HasPrefix(path, h.rootPath) {