Skip to content

Frontend Configuration Web Panel

Configure the Web Admin Panel appearance and behavior.

Basic Configuration

yaml
web:
  enabled: true
  port: 3000
  host: "127.0.0.1"

Web Panel Options

OptionTypeDefaultDescription
enabledbooleantrueEnable web panel
portnumber3000Listen port
hoststring127.0.0.1Listen address
titlestringChatAIPanel title
themestringautoColor theme

Theme Configuration

yaml
web:
  theme: auto           # auto, light, dark
  accentColor: blue     # Primary color

Access Control

yaml
web:
  auth:
    tokenExpiry: 86400000    # 24 hours
    permanentToken: false    # Allow permanent tokens
    allowedIPs:              # IP whitelist
      - "127.0.0.1"
      - "192.168.1.0/24"

SSL/HTTPS

yaml
web:
  ssl:
    enabled: true
    cert: "./ssl/cert.pem"
    key: "./ssl/key.pem"

Rate Limiting

yaml
web:
  rateLimit:
    windowMs: 60000      # 1 minute window
    maxRequests: 60      # Max requests per window

Session Configuration

yaml
web:
  session:
    secret: ${SESSION_SECRET}
    maxAge: 86400000     # 24 hours

Accessing Panel

Get login link:

txt
#ai管理面板          # Temporary link
#ai管理面板 永久     # Permanent link

External Access

To allow external access:

yaml
web:
  host: "0.0.0.0"       # Listen on all interfaces

Security

When exposing externally:

  1. Enable SSL
  2. Use strong session secret
  3. Configure IP whitelist
  4. Use firewall rules

Next Steps

Released under the MIT License