1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-09-16 01:56:55 +00:00

Remove SocketOrigin config, edit url building

This commit is contained in:
Kane York 2015-12-16 12:47:19 -08:00
parent 6b88b40538
commit 4b2449aecf
2 changed files with 8 additions and 6 deletions

View file

@ -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,
} }

View file

@ -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