From b62236bea81659bd6cdfac34b75f5409d2a97b49 Mon Sep 17 00:00:00 2001 From: vshakitskiy Date: Sun, 18 Jan 2026 20:08:15 +0300 Subject: [PATCH] fix paths --- {public => examples/public}/index.html | 0 {public => examples/public}/lorem_ipsum.txt | 0 examples/src/serving_files.gleam | 2 +- 3 files changed, 1 insertion(+), 1 deletion(-) rename {public => examples/public}/index.html (100%) rename {public => examples/public}/lorem_ipsum.txt (100%) diff --git a/public/index.html b/examples/public/index.html similarity index 100% rename from public/index.html rename to examples/public/index.html diff --git a/public/lorem_ipsum.txt b/examples/public/lorem_ipsum.txt similarity index 100% rename from public/lorem_ipsum.txt rename to examples/public/lorem_ipsum.txt diff --git a/examples/src/serving_files.gleam b/examples/src/serving_files.gleam index 8e5eb5c..6b36841 100644 --- a/examples/src/serving_files.gleam +++ b/examples/src/serving_files.gleam @@ -26,7 +26,7 @@ fn serve_file(path: String) -> Response { // In production, make sure to validate paths to prevent directory traversal // attacks! (e.g., requests to "../../../etc/passwd") // - case ewe.file("public" <> path, offset: None, limit: None) { + case ewe.file("public/" <> path, offset: None, limit: None) { Ok(file) -> { // Using "application/octet-stream" is safe for any file type, but you // may want to specify content-type based on file extension in production. -- 2.51.2