Skip to content

Commit ce59961

Browse files
committed
refactor(server): remove air proxy log
1 parent 9c1e557 commit ce59961

4 files changed

Lines changed: 0 additions & 18 deletions

File tree

deployments/docker-compose.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ services:
7676
CODEXGO_SERVER_GIN_ALLOWED_HOSTS: ${CODEXGO_SERVER_GIN_ALLOWED_HOSTS}
7777
CODEXGO_SERVER_GIN_COOKIE_SECRET_KEY: ${CODEXGO_SERVER_GIN_COOKIE_SECRET_KEY}
7878
CODEXGO_SERVER_GIN_COOKIE_SESSION_NAME: ${CODEXGO_SERVER_GIN_COOKIE_SESSION_NAME}
79-
CODEXGO_DEV_RELOAD_AIR_PROXY_PORT: ${CODEXGO_DEV_RELOAD_AIR_PROXY_PORT}
8079
volumes:
8180
- ${CODEXGO_CONTAINER_VOLUME}
8281
- codexgo-modules:/go/pkg/mod

internal/app/server/server.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"embed"
66
"fmt"
77
"net/http"
8-
"strings"
98

109
"github.com/bastean/codexgo/v4/internal/app/server/router"
1110
"github.com/bastean/codexgo/v4/internal/pkg/adapter/log"
@@ -37,10 +36,6 @@ func Up() error {
3736

3837
log.Info(fmt.Sprintf("%s listening on %s", Server.Gin, env.ServerGinURL))
3938

40-
if proxy, ok := env.HasServerGinProxy(); ok {
41-
log.Info(fmt.Sprintf("%s proxy listening on %s", Server.Gin, strings.Replace(env.ServerGinURL, env.ServerGinPort, proxy, 1)))
42-
}
43-
4439
if err := App.ListenAndServe(); errors.IsNot(err, http.ErrServerClosed) {
4540
log.CannotBeStarted(Server.Gin)
4641

internal/pkg/service/env/env.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ const (
3535
SERVER_GIN_ALLOWED_HOSTS = "CODEXGO_SERVER_GIN_ALLOWED_HOSTS"
3636
SERVER_GIN_COOKIE_SECRET_KEY = "CODEXGO_SERVER_GIN_COOKIE_SECRET_KEY"
3737
SERVER_GIN_COOKIE_SESSION_NAME = "CODEXGO_SERVER_GIN_COOKIE_SESSION_NAME"
38-
39-
DEV_RELOAD_AIR_PROXY_PORT = "CODEXGO_DEV_RELOAD_AIR_PROXY_PORT"
4038
)
4139

4240
var ENV = map[key]required{

internal/pkg/service/env/server.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,6 @@ func Server() {
1818
ServerGinCookieSessionName = os.Getenv(SERVER_GIN_COOKIE_SESSION_NAME)
1919
}
2020

21-
func HasServerGinProxy() (string, bool) {
22-
proxy := os.Getenv(DEV_RELOAD_AIR_PROXY_PORT)
23-
24-
if proxy != "" && proxy != ServerGinPort {
25-
return proxy, true
26-
}
27-
28-
return "", false
29-
}
30-
3121
func IsServerGinModeTest() bool {
3222
return ServerGinMode == "test"
3323
}

0 commit comments

Comments
 (0)