Skip to content

Commit

Permalink
fix: upstream parse issue
Browse files Browse the repository at this point in the history
  • Loading branch information
0xJacky committed Jan 5, 2023
1 parent a68866c commit 6c74ad4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion server/pkg/nginx/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@ func parse(block gonginx.IBlock, ngxConfig *NgxConfig) {
server.parseServer(v)
ngxConfig.Servers = append(ngxConfig.Servers, server)
case Upstream:
upstream := &NgxUpstream{}
upstream := &NgxUpstream{
Name: strings.Join(v.GetParameters(), " "),
}
upstream.Comments = comments
upstream.parseUpstream(v)
ngxConfig.Upstreams = append(ngxConfig.Upstreams, upstream)
Expand Down

0 comments on commit 6c74ad4

Please sign in to comment.