1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-22 01:57:12 -05:00

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

This commit is contained in:
Shelikhoo 2021-04-05 17:54:53 +01:00
parent 03f0da94ee
commit 7731405389
No known key found for this signature in database
GPG Key ID: C4D5E79D22B25316

View File

@ -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)