修复 MinIO 端口冲突并优化顶栏 IP 展示
- MinIO 宿主机端口改为 9100/9101,避免与 hfb-minio 冲突 - 测试与配置默认 PublicBase 同步为 9100 - 工作台顶栏固定展示 IP|地区,详情回填会话元数据 - 种子数据补充访客 IP/地区示例
This commit is contained in:
@@ -34,13 +34,13 @@ type JWTConfig struct {
|
||||
|
||||
// StorageConfig S3 兼容对象存储(MinIO / OSS / COS / S3 共用字段)
|
||||
type StorageConfig struct {
|
||||
Endpoint string // 如 localhost:9000 或 oss-cn-hangzhou.aliyuncs.com
|
||||
Endpoint string // 如 localhost:9100(开发 MinIO)或 oss-cn-hangzhou.aliyuncs.com
|
||||
AccessKey string
|
||||
SecretKey string
|
||||
Bucket string
|
||||
UseSSL bool
|
||||
Region string
|
||||
PublicBase string // 浏览器可访问前缀,如 http://localhost:9000/kefu
|
||||
PublicBase string // 浏览器可访问前缀,如 http://localhost:9100/kefu
|
||||
MaxUploadMB int
|
||||
MaxImageEdge int // 最长边像素
|
||||
WebPQuality float32
|
||||
@@ -65,13 +65,14 @@ func Load() *Config {
|
||||
ExpireTime: 24 * time.Hour,
|
||||
},
|
||||
Storage: StorageConfig{
|
||||
Endpoint: getEnv("STORAGE_ENDPOINT", "localhost:9000"),
|
||||
// 默认映射宿主机 9100→容器 9000,避免与其它项目 MinIO 冲突
|
||||
Endpoint: getEnv("STORAGE_ENDPOINT", "localhost:9100"),
|
||||
AccessKey: getEnv("STORAGE_ACCESS_KEY", "minioadmin"),
|
||||
SecretKey: getEnv("STORAGE_SECRET_KEY", "minioadmin"),
|
||||
Bucket: getEnv("STORAGE_BUCKET", "kefu"),
|
||||
UseSSL: getEnvBool("STORAGE_USE_SSL", false),
|
||||
Region: getEnv("STORAGE_REGION", "us-east-1"),
|
||||
PublicBase: getEnv("STORAGE_PUBLIC_BASE_URL", "http://localhost:9000/kefu"),
|
||||
PublicBase: getEnv("STORAGE_PUBLIC_BASE_URL", "http://localhost:9100/kefu"),
|
||||
MaxUploadMB: getEnvInt("STORAGE_MAX_UPLOAD_MB", 10),
|
||||
MaxImageEdge: getEnvInt("STORAGE_MAX_IMAGE_EDGE", 1920),
|
||||
WebPQuality: float32(getEnvInt("STORAGE_WEBP_QUALITY", 80)),
|
||||
|
||||
Reference in New Issue
Block a user