HttpConfig

package
v0.2.11 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2025 License: MIT Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpServerConfig

type HttpServerConfig struct {
	// Bind Address
	Host string `config:"HTTP_BIND_ADDRESS" default:"0.0.0.0"`
	Port int    `config:"HTTP_BIND_PORT" default:"8080"`

	// CORS
	AllowedOrigins string `config:"HTTP_ALLOWED_ORIGINS" default:"*"`

	// Encryption
	TLS     bool   `config:"HTTP_TLS" default:"false"`
	TLSCert string `config:"HTTP_TLS_CERT" default:""`
	TLSKey  string `config:"HTTP_TLS_KEY" default:""`

	CookieSecret config.Secret `config:"HTTP_COOKIE_SECRET" default:""`
	//TODO: Do not forget about changing session name key
	CookieName  string `config:"HTTP_COOKIE_STORE_NAME" default:"session_key_name_to_change_at_some_point"`
	CookeMaxAge int    `config:"HTTP_COOKIE_MAX_AGE" default:"604800"` // 7 days
}

Jump to

Keyboard shortcuts

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