Add website_address config option

This commit is contained in:
2021-01-12 23:20:32 +01:00
parent 7361711ba6
commit 7995476926
6 changed files with 39 additions and 33 deletions

View File

@@ -15,6 +15,7 @@ import (
type PixelWebConfig struct {
APIURLExternal string `toml:"api_url_external"`
APIURLInternal string `toml:"api_url_internal"`
WebsiteAddress string `toml:"website_address"`
SessionCookieDomain string `toml:"session_cookie_domain"`
ResourceDir string `toml:"resource_dir"`
DebugMode bool `toml:"debug_mode"`
@@ -26,6 +27,7 @@ const DefaultConfig = `# Pixeldrain Web UI server configuration
api_url_external = "/api" # Used in the web browser
api_url_internal = "http://127.0.0.1:8080" # Used for internal API requests to the pixeldrain server, not visible to users
website_address = "https://pixeldrain.com"
session_cookie_domain = ".pixeldrain.com"
resource_dir = "res"
debug_mode = false
@@ -62,6 +64,7 @@ func Init(r *httprouter.Router, prefix string, setLogLevel bool) {
webconf.ResourceDir,
webconf.APIURLInternal,
webconf.APIURLExternal,
webconf.WebsiteAddress,
webconf.SessionCookieDomain,
webconf.MaintenanceMode,
webconf.DebugMode,