mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-09-16 10:06:54 +00:00
Remove SocketOrigin config, edit url building
This commit is contained in:
parent
6b88b40538
commit
4b2449aecf
2 changed files with 8 additions and 6 deletions
|
@ -18,6 +18,11 @@ import (
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const bPathAnnounceStartup = "/startup"
|
||||||
|
const bPathAddTopic = "/topics"
|
||||||
|
const bPathAggStats = "/stats"
|
||||||
|
const bPathOtherCommand = "/cmd/"
|
||||||
|
|
||||||
var backendHTTPClient http.Client
|
var backendHTTPClient http.Client
|
||||||
var backendURL string
|
var backendURL string
|
||||||
var responseCache *cache.Cache
|
var responseCache *cache.Cache
|
||||||
|
@ -39,9 +44,9 @@ func setupBackend(config *ConfigFile) {
|
||||||
}
|
}
|
||||||
responseCache = cache.New(60*time.Second, 120*time.Second)
|
responseCache = cache.New(60*time.Second, 120*time.Second)
|
||||||
|
|
||||||
postStatisticsURL = fmt.Sprintf("%s/stats", backendURL)
|
announceStartupURL = fmt.Sprintf("%s%s", backendURL, bPathAnnounceStartup)
|
||||||
addTopicURL = fmt.Sprintf("%s/topics", backendURL)
|
addTopicURL = fmt.Sprintf("%s%s", backendURL, bPathAddTopic)
|
||||||
announceStartupURL = fmt.Sprintf("%s/startup", backendURL)
|
postStatisticsURL = fmt.Sprintf("%s%s", backendURL, bPathAggStats)
|
||||||
|
|
||||||
messageBufferPool.New = New4KByteBuffer
|
messageBufferPool.New = New4KByteBuffer
|
||||||
|
|
||||||
|
@ -270,7 +275,6 @@ func GenerateKeys(outputFile, serverID, theirPublicStr string) {
|
||||||
output := ConfigFile{
|
output := ConfigFile{
|
||||||
ListenAddr: "0.0.0.0:8001",
|
ListenAddr: "0.0.0.0:8001",
|
||||||
SSLListenAddr: "0.0.0.0:443",
|
SSLListenAddr: "0.0.0.0:443",
|
||||||
SocketOrigin: "localhost:8001",
|
|
||||||
BackendURL: "http://localhost:8002/ffz",
|
BackendURL: "http://localhost:8002/ffz",
|
||||||
MinMemoryKBytes: defaultMinMemoryKB,
|
MinMemoryKBytes: defaultMinMemoryKB,
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,8 +18,6 @@ type ConfigFile struct {
|
||||||
ServerID int
|
ServerID int
|
||||||
ListenAddr string
|
ListenAddr string
|
||||||
SSLListenAddr string
|
SSLListenAddr string
|
||||||
// Hostname of the socket server
|
|
||||||
SocketOrigin string
|
|
||||||
// URL to the backend server
|
// URL to the backend server
|
||||||
BackendURL string
|
BackendURL string
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue