Browse Source

fix: update to use GetStubStatusPort method for Nginx settings

Jacky 3 weeks ago
parent
commit
b59da3e7e8
1 changed files with 2 additions and 2 deletions
  1. 2 2
      internal/nginx/stub_status.go

+ 2 - 2
internal/nginx/stub_status.go

@@ -133,7 +133,7 @@ func IsStubStatusEnabled() (bool, string) {
 	for _, server := range ngxConfig.Servers {
 	for _, server := range ngxConfig.Servers {
 		protocol := StubStatusProtocol
 		protocol := StubStatusProtocol
 		host := StubStatusHost
 		host := StubStatusHost
-		port := settings.NginxSettings.StubStatusPort
+		port := settings.NginxSettings.GetStubStatusPort()
 
 
 		for _, location := range server.Locations {
 		for _, location := range server.Locations {
 			// Check if the location content contains stub_status
 			// Check if the location content contains stub_status
@@ -200,7 +200,7 @@ server {
 
 
 	data := StubStatusTemplateData{
 	data := StubStatusTemplateData{
 		ModifiedTime: time.Now().Format(time.DateTime),
 		ModifiedTime: time.Now().Format(time.DateTime),
-		Port:         settings.NginxSettings.StubStatusPort,
+		Port:         settings.NginxSettings.GetStubStatusPort(),
 		ServerName:   "localhost",
 		ServerName:   "localhost",
 		StatusPath:   StubStatusPath,
 		StatusPath:   StubStatusPath,
 		AllowIP:      StubStatusAllow,
 		AllowIP:      StubStatusAllow,