mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-13 03:15:48 +02:00
parent
594c61a0ff
commit
f5a2a634a1
21 changed files with 420 additions and 96 deletions
|
@ -13,6 +13,10 @@ const (
|
|||
Upstream = "upstream"
|
||||
)
|
||||
|
||||
func (s *NgxServer) ParseServer(directive gonginx.IDirective) {
|
||||
s.parseServer(directive)
|
||||
}
|
||||
|
||||
func (s *NgxServer) parseServer(directive gonginx.IDirective) {
|
||||
if directive.GetBlock() == nil {
|
||||
return
|
||||
|
@ -36,7 +40,9 @@ func (s *NgxServer) parseServer(directive gonginx.IDirective) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (l *NgxLocation) ParseLocation(directive gonginx.IDirective, deep int) {
|
||||
l.parseLocation(directive, deep)
|
||||
}
|
||||
func (l *NgxLocation) parseLocation(directive gonginx.IDirective, deep int) {
|
||||
if directive.GetBlock() == nil {
|
||||
return
|
||||
|
@ -52,6 +58,10 @@ func (l *NgxLocation) parseLocation(directive gonginx.IDirective, deep int) {
|
|||
}
|
||||
}
|
||||
|
||||
func (d *NgxDirective) ParseDirective(directive gonginx.IDirective, deep int) {
|
||||
d.parseDirective(directive, deep)
|
||||
}
|
||||
|
||||
func (d *NgxDirective) parseDirective(directive gonginx.IDirective, deep int) {
|
||||
if directive.GetBlock() != nil {
|
||||
d.Params += directive.GetName() + " "
|
||||
|
@ -134,6 +144,7 @@ func parse(block gonginx.IBlock, ngxConfig *NgxConfig) {
|
|||
ngxConfig.parseCustom(v)
|
||||
}
|
||||
}
|
||||
ngxConfig.Custom = FmtCode(ngxConfig.Custom)
|
||||
}
|
||||
|
||||
func ParseNgxConfigByContent(content string) (ngxConfig *NgxConfig) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue