double oops

This commit is contained in:
TaiAurori 2022-06-25 20:03:30 -04:00
parent fa081c9d87
commit 826f07e60b
3 changed files with 9 additions and 5 deletions

View file

@ -8,6 +8,7 @@ import (
type Configuration struct {
BaseUrl string `yaml:"baseUrl"`
PortNumber string `yaml:"portNumber"`
Protocol string `yaml:"protocol"`
DebugMode bool `yaml:"debugMode"`
MaxTextureSize int `yaml:"maxTextureSize"`

View file

@ -1,13 +1,16 @@
# The primary domain the Tripwire instance is hosted on.
# To specify a port, use a colon after the domain, then the port number.
# (e.g example.com:1234)
# If you are proxying Tripwire, include the port number your proxy uses.
# If not, it will use the regular port number.
# It shouldn't be a local IP in production.
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://"
# Show debug output (if unsure, set to false)
# Show debug output. (if unsure, set to false)
debugMode: true
# The maximum size (in bytes) of a skin/cape that can be uploaded.

View file

@ -45,7 +45,7 @@ func handleRequests() {
registerWebEndpoints(r)
splitUrl := strings.Split(config.BaseUrl, ":")
port := "8080"
port := config.PortNumber
if len(splitUrl) > 1 {
port = splitUrl[1]
}