config

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 13, 2026 License: Apache-2.0 Imports: 2 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Profile

type Profile struct {
	// Mode can be "prod" or "dev"
	Mode common.ReleaseMode
	// Port is the binding port for the server.
	Port int
	// PgURL is the PostgreSQL instance connection url
	PgURL string

	// can be set in runtime
	RuntimeDebug atomic.Bool

	// Secret is the resolved per-deployment JWT signing key. It is populated
	// from the AUTH_SECRET setting in the database at startup, never from a
	// flag or environment variable.
	Secret string

	// CORSAllowOrigins is the exact list of browser origins allowed to call the
	// server with credentials. An empty list installs no CORS middleware at
	// all, so only the browser same-origin policy applies. It replaces the
	// former "any origin in dev" behavior: a wide-open credentialed CORS is a
	// CSRF vector and must be opted into explicitly.
	CORSAllowOrigins []string

	// TrustedProxies are the peer IPs or CIDRs whose X-Forwarded-For may be
	// believed when recording an audit source address. Empty means the
	// connection address is used, so a client cannot forge its audit IP.
	TrustedProxies []string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL