mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 10:25:52 +02:00
feat: add field of nginx worker processes mode
This commit is contained in:
parent
d487af0567
commit
bdb347cb24
8 changed files with 36 additions and 20 deletions
|
@ -11,6 +11,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/uozi-tech/cosy/logger"
|
||||
)
|
||||
|
||||
// StubStatusInfo Store the stub_status module status
|
||||
|
@ -32,7 +33,7 @@ type StubStatusData struct {
|
|||
const (
|
||||
StubStatusPort = 51828
|
||||
StubStatusPath = "/stub_status"
|
||||
StubStatusHost = "localhost"
|
||||
StubStatusHost = "127.0.0.1"
|
||||
StubStatusProtocol = "http"
|
||||
StubStatusAllow = "127.0.0.1"
|
||||
StubStatusDeny = "all"
|
||||
|
@ -53,6 +54,7 @@ func GetStubStatusData() (bool, *StubStatusData, error) {
|
|||
|
||||
// Get the stub_status status information
|
||||
enabled, statusURL := IsStubStatusEnabled()
|
||||
logger.Info("GetStubStatusData", "enabled", enabled, "statusURL", statusURL)
|
||||
if !enabled {
|
||||
return false, result, fmt.Errorf("stub_status is not enabled")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue