ServerConfig class

API server configuration.

This struct holds all configuration options for the Xberg API server, including host/port settings, CORS configuration, and upload limits.

Defaults

  • host: "127.0.0.1" (localhost only)
  • port: 8000
  • cors_origins: empty vector (allows all origins)
  • max_request_body_bytes: 104_857_600 (100 MB)
  • max_multipart_field_bytes: 104_857_600 (100 MB)
  • job_timeout_secs: 600 (10 minutes)

Constructors

ServerConfig({required String host, required PlatformInt64 port, required List<String> corsOrigins, required PlatformInt64 maxRequestBodyBytes, required PlatformInt64 maxMultipartFieldBytes, required PlatformInt64 jobTimeoutSecs})
const

Properties

corsOrigins → List<String>
CORS allowed origins. Empty vector means allow all origins.
final
hashCode → int
The hash code for this object.
no setteroverride
host → String
Server host address (e.g., "127.0.0.1", "0.0.0.0")
final
jobTimeoutSecs → int
Fallback timeout, in seconds, for POST /extract-async jobs whose request does not pin down extraction_timeout_secs (default: 600, 10 minutes).
final
maxMultipartFieldBytes → int
Maximum size of multipart fields in bytes (default: 100 MB)
final
maxRequestBodyBytes → int
Maximum size of request body in bytes (default: 100 MB)
final
port → int
Server port number
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
override