Build and publish Docker images / Build and publish images (push) Successful in 2m10s
129 lines
3.1 KiB
YAML
129 lines
3.1 KiB
YAML
server:
|
|
host: "0.0.0.0"
|
|
port: 3000
|
|
mode: "debug" # debug, release, test
|
|
read_header_timeout_seconds: 5
|
|
read_timeout_seconds: 30
|
|
write_timeout_seconds: 30
|
|
idle_timeout_seconds: 120
|
|
shutdown_timeout_seconds: 30
|
|
max_header_bytes: 1048576
|
|
# Add explicit reverse-proxy IPs/CIDRs; XFF is ignored otherwise.
|
|
trusted_proxies: []
|
|
cors:
|
|
# Retained for config compatibility; GoChat allows all origins.
|
|
allowed_origins: []
|
|
allowed_methods:
|
|
- "GET"
|
|
- "POST"
|
|
- "PUT"
|
|
- "DELETE"
|
|
- "PATCH"
|
|
- "OPTIONS"
|
|
allowed_headers:
|
|
- "Origin"
|
|
- "Content-Type"
|
|
- "Accept"
|
|
- "Authorization"
|
|
- "X-Account-ID"
|
|
- "X-Auth-Token"
|
|
- "X-Widget-Token"
|
|
- "X-Identifier-Hash"
|
|
- "access-token"
|
|
- "client"
|
|
- "uid"
|
|
- "token-type"
|
|
- "expiry"
|
|
expose_headers:
|
|
- "Content-Length"
|
|
- "access-token"
|
|
- "client"
|
|
- "uid"
|
|
- "token-type"
|
|
- "expiry"
|
|
# Retained for config compatibility; wildcard CORS does not use credentials.
|
|
allow_credentials: false
|
|
# Preflight cache duration in seconds.
|
|
max_age: 86400
|
|
|
|
database:
|
|
dsn: "postgres://postgres@localhost:5432/gochat_dev?sslmode=disable"
|
|
max_idle_conns: 10
|
|
max_open_conns: 100
|
|
conn_max_lifetime: 3600 # seconds
|
|
# Auto-run migrations on startup (dev convenience).
|
|
run_migrations: true
|
|
migrations_path: "migrations"
|
|
|
|
redis:
|
|
dsn: "redis://localhost:6379/0"
|
|
pool_size: 50
|
|
|
|
jwt:
|
|
secret: "gochat_dev_secret_change_in_production"
|
|
previous_secrets: []
|
|
allow_insecure_header_auth: false
|
|
access_expiry_minutes: 15
|
|
refresh_expiry_hours: 168
|
|
ws_ticket_ttl_seconds: 30
|
|
issuer: "gochat"
|
|
audience: "gochat-api"
|
|
|
|
encryption:
|
|
enabled: false
|
|
current_key_version: 1
|
|
aes_key: ""
|
|
previous_keys: {}
|
|
|
|
log:
|
|
level: "debug" # debug, info, warn, error
|
|
format: "json" # json, text
|
|
|
|
rate_limit:
|
|
enabled: true
|
|
login:
|
|
requests: 10
|
|
window_seconds: 60
|
|
password_reset:
|
|
requests: 5
|
|
window_seconds: 300
|
|
public_upload:
|
|
requests: 20
|
|
window_seconds: 60
|
|
webhook:
|
|
requests: 120
|
|
window_seconds: 60
|
|
|
|
search:
|
|
# Chatwoot parity target. Use "db" only for explicit local fallback.
|
|
engine: "meilisearch"
|
|
host: "http://localhost:7700"
|
|
api_key: ""
|
|
index_prefix: "gochat_"
|
|
timeout_seconds: 5
|
|
|
|
geoip:
|
|
# Optional read-only MaxMind-compatible City database. Empty disables lookup.
|
|
db_path: ""
|
|
|
|
saml:
|
|
enabled: false # SAML 2.0 SSO — enable for enterprise IdP integration
|
|
# IdP metadata: provide URL or inline XML (URL preferred for auto-refresh).
|
|
idp_metadata_url: ""
|
|
# Fallback: paste IdP metadata XML here.
|
|
idp_metadata_xml: ""
|
|
# Our SP entity ID.
|
|
sp_entity_id: "https://gochat.example.com/saml"
|
|
# Assertion Consumer Service URL.
|
|
acs_url: "https://gochat.example.com/api/v1/saml/acs"
|
|
# SP key/certificate is PEM format and required for signed AuthnRequest
|
|
# and response validation.
|
|
sp_private_key: ""
|
|
sp_certificate: ""
|
|
clock_drift_tolerance: 180 # seconds of allowed clock drift
|
|
attribute_map:
|
|
email: "email"
|
|
display_name: "displayName"
|
|
first_name: "firstName"
|
|
last_name: "lastName"
|