Fix: room hot list creator name

pull/24/head
zijiren233 1 year ago
parent 1e6af855cc
commit f78a06befe

@ -4,8 +4,8 @@ type RateLimitConfig struct {
Enable bool `yaml:"enable" lc:"default: false" env:"SERVER_RATE_LIMIT_ENABLE"`
Period string `yaml:"period" env:"SERVER_RATE_LIMIT_PERIOD"`
Limit int64 `yaml:"limit" env:"SERVER_RATE_LIMIT_LIMIT"`
TrustForwardHeader bool `yaml:"trust_forward_header" lc:"default: false" hc:"configure the limiter to trust X-Real-IP and X-Forwarded-For headers. Please be advised that using this option could be insecure (ie: spoofed) if your reverse proxy is not configured properly to forward a trustworthy client IP." env:"SERVER_TRUST_FORWARD_HEADER"`
TrustedClientIPHeader string `yaml:"trusted_client_ip_header" hc:"configure the limiter to use a custom header to obtain user IP. Please be advised that using this option could be insecure (ie: spoofed) if your reverse proxy is not configured properly to forward a trustworthy client IP." env:"SERVER_TRUSTED_CLIENT_IP_HEADER"`
TrustForwardHeader bool `yaml:"trust_forward_header" lc:"default: false" hc:"configure the limiter to trust X-Real-IP and X-Forwarded-For headers. Please be advised that using this option could be insecure (ie: spoofed) if your reverse proxy is not configured properly to forward a trustworthy client IP." env:"SERVER_RATE_LIMIT_TRUST_FORWARD_HEADER"`
TrustedClientIPHeader string `yaml:"trusted_client_ip_header" hc:"configure the limiter to use a custom header to obtain user IP. Please be advised that using this option could be insecure (ie: spoofed) if your reverse proxy is not configured properly to forward a trustworthy client IP." env:"SERVER_RATE_LIMIT_TRUSTED_CLIENT_IP_HEADER"`
}
func DefaultRateLimitConfig() RateLimitConfig {

@ -228,7 +228,7 @@ func GetRoomHeapInCacheWithoutHidden() RoomHeap {
RoomName: v.Name,
PeopleNum: v.ClientNum(),
NeedPassword: v.NeedPassword(),
Creator: v.CreatorID,
Creator: GetUserName(v.CreatorID),
CreatedAt: v.CreatedAt.UnixMilli(),
})
}

Loading…
Cancel
Save