🔨 Update build script
This commit is contained in:
		
							
								
								
									
										2
									
								
								.github/workflows/nightly.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/nightly.yml
									
									
									
									
										vendored
									
									
								
							| @@ -25,4 +25,4 @@ jobs: | ||||
|           context: . | ||||
|           file: ./Dockerfile | ||||
|           push: true | ||||
|           tags: xsheep2010/dealer:nightly | ||||
|           tags: xsheep2010/nexus:nightly | ||||
|   | ||||
| @@ -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"] | ||||
|   | ||||
| @@ -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, | ||||
| 	}) | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user