Skip to content
This repository was archived by the owner on Jul 10, 2025. It is now read-only.

Commit 594c0b0

Browse files
committed
fixed path on legacy support for X_RELATIVE_PATH
Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
1 parent 18b85da commit 594c0b0

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,11 @@ SOFTWARE
138138

139139
The fileserver took `/static/filserver.gr`, removed the `/static/` part from the front, and then loaded `fileserver.gr` from the directory mounted in the `modules.toml`. Note that any subdirectories are also served. So `/static/foo/bar` would translate to the path `foo/bar` inside of the WebAssembly module (which in the example above would fully resolve to "/path/to/fileserver/foo/bar").
140140

141+
## Security Note
142+
143+
The Wagi fileserver is designed to serve any file mounted in the volume. Do not mount a
144+
volume that contains files you do not want served.
145+
141146
## Code of Conduct
142147

143148
This project has adopted the [Microsoft Open Source Code of

fileserver.gr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ let guestpath = (env) => {
5151
// Backward compat for an older version of Wagi that had PATH_INFO wrong.
5252
// X_RELATIVE_PATH was removed before Wagi 0.4
5353
match (Map.get("X_RELATIVE_PATH", env)) {
54-
Some(p) => p,
54+
Some(p) => String.concat("/", p),
5555
None => {
5656
Option.unwrap(Map.get("PATH_INFO", env))
5757
}

0 commit comments

Comments
 (0)