Browse Source

partly revert @kslr's change to the browser forwarder that unnecessarily convert to the platform format.

Shelikhoo 4 years ago
parent
commit
7731405389
1 changed files with 1 additions and 2 deletions
  1. 1 2
      app/browserforwarder/forwarder.go

+ 1 - 2
app/browserforwarder/forwarder.go

@@ -7,7 +7,6 @@ import (
 	"context"
 	"io"
 	"net/http"
-	"path/filepath"
 	"time"
 
 	"github.com/v2fly/BrowserBridge/handler"
@@ -80,7 +79,7 @@ func BridgeResource(rw http.ResponseWriter, r *http.Request, path string) {
 	if content == "" {
 		content = "index.html"
 	}
-	data, err := securedload.GetAssetSecured(filepath.Join("browserforwarder", content))
+	data, err := securedload.GetAssetSecured("browserforwarder/" + content)
 	if err != nil {
 		err = newError("cannot load necessary resources").Base(err)
 		http.Error(rw, err.Error(), http.StatusForbidden)