diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 54fbd9a..b06faa0 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -25,4 +25,4 @@ jobs: context: . file: ./Dockerfile push: true - tags: xsheep2010/dealer:nightly + tags: xsheep2010/nexus:nightly diff --git a/Dockerfile b/Dockerfile index 226fe4f..0c11bb8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,5 @@ # Building Backend -FROM golang:alpine as dealer-server - -RUN apk add nodejs npm +FROM golang:alpine as nexus-server WORKDIR /source COPY . . @@ -12,8 +10,8 @@ RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -buildvcs -o /dist ./pkg/main # Runtime FROM golang:alpine -COPY --from=dealer-server /dist /dealer/server +COPY --from=nexus-server /dist /nexus/server EXPOSE 8444 -CMD ["/dealer/server"] +CMD ["/nexus/server"] diff --git a/pkg/internal/http/api/forward.go b/pkg/internal/http/api/forward.go index 9a6b706..04909d3 100644 --- a/pkg/internal/http/api/forward.go +++ b/pkg/internal/http/api/forward.go @@ -6,6 +6,7 @@ import ( "github.com/gofiber/fiber/v2" "github.com/gofiber/fiber/v2/middleware/proxy" "github.com/spf13/viper" + "github.com/valyala/fasthttp" "strings" ) @@ -34,6 +35,9 @@ func forwardService(c *fiber.Ctx) error { c.Request().Header.Del(fiber.HeaderAuthorization) } - return proxy.Do(c, url) - + return proxy.Do(c, url, &fasthttp.Client{ + NoDefaultUserAgentHeader: true, + DisablePathNormalizing: true, + StreamResponseBody: true, + }) }