Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
sysulq committed Nov 20, 2024
1 parent e85cb42 commit d63f1ab
Show file tree
Hide file tree
Showing 12 changed files with 222 additions and 218 deletions.
2 changes: 2 additions & 0 deletions internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ type ServerConfig struct {

type HTTPConfig struct {
Address string
Disable bool
Jwt Jwt
}

type Grpc struct {
Expand Down
6 changes: 4 additions & 2 deletions internal/server/gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,14 @@ func (s *server) BuildHTTPServer() (http.Handler, error) {
mux := http.NewServeMux()
cfg := s.config.Get().Config()

s.httpUpstream.Get().Register(context.Background(), mux)
if !cfg.Server.HTTP.Disable {
s.httpUpstream.Get().Register(context.Background(), mux)
}

var handler http.Handler = addHeader(mux)
handler = otelhttp.NewMiddleware("graphql-gateway")(handler)

if cfg.Server.GraphQL.Jwt.Enable {
if cfg.Server.HTTP.Jwt.Enable {
handler = s.jwtAuthHandler(handler)
}

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
148 changes: 74 additions & 74 deletions internal/server/kod_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 14 additions & 14 deletions internal/server/kod_gen_interface.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d63f1ab

Please sign in to comment.