fix: add nil guard before entrypoint retrieval; move config from types/

This commit is contained in:
yusing
2026-02-06 12:01:09 +08:00
parent e383cd247a
commit a6fed3f221
17 changed files with 90 additions and 37 deletions

View File

@@ -1,15 +0,0 @@
package entrypoint
import (
"github.com/yusing/godoxy/internal/logging/accesslog"
"github.com/yusing/godoxy/internal/route/rules"
)
type Config struct {
SupportProxyProtocol bool `json:"support_proxy_protocol"`
Rules struct {
NotFound rules.Rules `json:"not_found"`
} `json:"rules"`
Middlewares []map[string]any `json:"middlewares"`
AccessLog *accesslog.RequestLoggerConfig `json:"access_log" validate:"omitempty"`
}

View File

@@ -5,7 +5,7 @@ import (
)
type Entrypoint interface {
Config() *Config
SupportProxyProtocol() bool
DisablePoolsLog(v bool)