♻️ Some review/improvements

This commit is contained in:
Nicolas Lepage
2020-12-24 12:38:29 +01:00
parent da00fd7bd1
commit 45dd443a09
3 changed files with 23 additions and 8 deletions

View File

@@ -22,7 +22,7 @@ func Serve(handler http.Handler) func() {
path = path + "/"
}
if path != "" {
if path != "" { // FIXME always true since / suffix is added to path
prefix := os.Getenv("WASMHTTP_PATH")
for strings.HasSuffix(prefix, "/") {
prefix = strings.TrimSuffix(prefix, "/")