forked from TripwireTeam/tripwire
double oops
This commit is contained in:
parent
fa081c9d87
commit
826f07e60b
|
@ -8,6 +8,7 @@ import (
|
||||||
|
|
||||||
type Configuration struct {
|
type Configuration struct {
|
||||||
BaseUrl string `yaml:"baseUrl"`
|
BaseUrl string `yaml:"baseUrl"`
|
||||||
|
PortNumber string `yaml:"portNumber"`
|
||||||
Protocol string `yaml:"protocol"`
|
Protocol string `yaml:"protocol"`
|
||||||
DebugMode bool `yaml:"debugMode"`
|
DebugMode bool `yaml:"debugMode"`
|
||||||
MaxTextureSize int `yaml:"maxTextureSize"`
|
MaxTextureSize int `yaml:"maxTextureSize"`
|
||||||
|
|
11
config.yaml
11
config.yaml
|
@ -1,13 +1,16 @@
|
||||||
# The primary domain the Tripwire instance is hosted on.
|
# The primary domain the Tripwire instance is hosted on.
|
||||||
# To specify a port, use a colon after the domain, then the port number.
|
# If you are proxying Tripwire, include the port number your proxy uses.
|
||||||
# (e.g example.com:1234)
|
# If not, it will use the regular port number.
|
||||||
# It shouldn't be a local IP in production.
|
# It shouldn't be a local IP in production.
|
||||||
baseUrl: "localhost"
|
baseUrl: "localhost"
|
||||||
|
|
||||||
# The protocol to be used for Tripwire
|
# The port number Tripwire will listen on.
|
||||||
|
portNumber: "8080"
|
||||||
|
|
||||||
|
# The protocol to be used for Tripwire.
|
||||||
protocol: "http://"
|
protocol: "http://"
|
||||||
|
|
||||||
# Show debug output (if unsure, set to false)
|
# Show debug output. (if unsure, set to false)
|
||||||
debugMode: true
|
debugMode: true
|
||||||
|
|
||||||
# The maximum size (in bytes) of a skin/cape that can be uploaded.
|
# The maximum size (in bytes) of a skin/cape that can be uploaded.
|
||||||
|
|
2
main.go
2
main.go
|
@ -45,7 +45,7 @@ func handleRequests() {
|
||||||
registerWebEndpoints(r)
|
registerWebEndpoints(r)
|
||||||
|
|
||||||
splitUrl := strings.Split(config.BaseUrl, ":")
|
splitUrl := strings.Split(config.BaseUrl, ":")
|
||||||
port := "8080"
|
port := config.PortNumber
|
||||||
if len(splitUrl) > 1 {
|
if len(splitUrl) > 1 {
|
||||||
port = splitUrl[1]
|
port = splitUrl[1]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue