Use base url to generate template links/redirects

This commit is contained in:
2022-08-02 11:48:42 +02:00
parent 5beae19d21
commit d786d3a26f
7 changed files with 29 additions and 8 deletions

View File

@ -37,6 +37,7 @@ func NewFromFile(filepath string) (*Config, error) {
type HTTPConfig struct {
Address string `yaml:"address" env:"HTTP_ADDRESS"`
PublicBaseURL string `yaml:"publicBaseURL" env:"HTTP_PUBLIC_BASE_URL"`
CookieAuthenticationKey string `yaml:"cookieAuthenticationKey" env:"HTTP_COOKIE_AUTHENTICATION_KEY"`
CookieEncryptionKey string `yaml:"cookieEncryptionKey" env:"HTTP_COOKIE_ENCRYPTION_KEY"`
CookieMaxAge int `yaml:"cookieMaxAge" env:"HTTP_COOKIE_MAX_AGE"`
@ -73,6 +74,7 @@ func NewDefault() *Config {
},
HTTP: HTTPConfig{
Address: ":3002",
PublicBaseURL: "",
CookieAuthenticationKey: "",
CookieEncryptionKey: "",
CookiePath: "/",