mirror of
https://github.com/pikami/cosmium.git
synced 2025-12-20 17:30:30 +00:00
Fix cosmos explorer incorrect redirect
This commit is contained in:
@@ -8,8 +8,9 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
DefaultAccountKey = "C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw=="
|
||||
EnvPrefix = "COSMIUM_"
|
||||
DefaultAccountKey = "C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw=="
|
||||
EnvPrefix = "COSMIUM_"
|
||||
ExplorerBaseUrlLocation = "/_explorer"
|
||||
)
|
||||
|
||||
var Config = ServerConfig{}
|
||||
@@ -45,6 +46,7 @@ func ParseFlags() {
|
||||
Config.DatabaseDomain = Config.Host
|
||||
Config.DatabaseEndpoint = fmt.Sprintf("https://%s:%d/", Config.Host, Config.Port)
|
||||
Config.AccountKey = *accountKey
|
||||
Config.ExplorerBaseUrlLocation = ExplorerBaseUrlLocation
|
||||
}
|
||||
|
||||
func setFlagsFromEnvironment() (err error) {
|
||||
|
||||
@@ -6,14 +6,15 @@ type ServerConfig struct {
|
||||
DatabaseEndpoint string
|
||||
AccountKey string
|
||||
|
||||
ExplorerPath string
|
||||
Port int
|
||||
Host string
|
||||
TLS_CertificatePath string
|
||||
TLS_CertificateKey string
|
||||
InitialDataFilePath string
|
||||
PersistDataFilePath string
|
||||
DisableAuth bool
|
||||
DisableTls bool
|
||||
Debug bool
|
||||
ExplorerPath string
|
||||
Port int
|
||||
Host string
|
||||
TLS_CertificatePath string
|
||||
TLS_CertificateKey string
|
||||
InitialDataFilePath string
|
||||
PersistDataFilePath string
|
||||
DisableAuth bool
|
||||
DisableTls bool
|
||||
Debug bool
|
||||
ExplorerBaseUrlLocation string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user