欢迎访问高级配置文档!以下内容将帮助您深入理解系统的复杂设置与优化技巧。

📌 核心配置项

  • 自定义端口
    可通过 config.port 参数修改默认端口(如:http://localhost:8080
    ⚠️ 修改前请确保端口未被其他服务占用

  • SSL/TLS 配置
    启用加密需配置证书路径:

    ssl: true
    cert_path: "/etc/ssl/fullchain.pem"
    key_path: "/etc/ssl/privkey.pem"
    
  • 日志级别调整
    支持 debug/info/warn/error 四种模式
    📝 推荐生产环境使用 info 模式

🧩 高级功能扩展

🌐 跨域设置 (CORS)

参数 类型 默认值 说明
allowed_origins list * 允许的来源域名
max_age int 86400 预检请求缓存时间(秒)

🧮 性能调优

  • 启用连接池:connection_pool: true
  • 调整超时时间:timeout: 30s
  • 启用 Gzip 压缩:gzip: true

📚 推荐阅读

如需了解更多配置细节,请查看 /docs/quick_start 获取入门指导,或查阅 /api_reference 了解完整接口说明。

配置_示意图
高级设置_图标