1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-11-10 02:35:58 +01:00

Move ice-servers.json under dataDir.

This makes it easier to deploy by putting all user-serviceable files
under data/.
This commit is contained in:
Juliusz Chroboczek 2020-08-07 11:14:34 +02:00
parent 4e594465cc
commit 8a4d315c51
4 changed files with 10 additions and 3 deletions

2
README
View file

@ -15,7 +15,7 @@ Set the server administrator's username and password (optional):
Configure the list of STUN and TURN servers (optional):
vi static/ice-servers.json
vi data/ice-servers.json
Set up a group

2
sfu.go
View file

@ -81,7 +81,7 @@ func main() {
}()
}
iceFilename = filepath.Join(staticRoot, "ice-servers.json")
iceFilename = filepath.Join(dataDir, "ice-servers.json")
go readPublicGroups()
webserver()

View file

@ -24,7 +24,8 @@ func webserver() {
http.HandleFunc("/group/",
func(w http.ResponseWriter, r *http.Request) {
mungeHeader(w)
http.ServeFile(w, r, staticRoot+"/sfu.html")
http.ServeFile(w, r,
filepath.Join(staticRoot, "sfu.html"))
})
http.HandleFunc("/recordings",
func(w http.ResponseWriter, r *http.Request) {
@ -33,6 +34,12 @@ func webserver() {
})
http.HandleFunc("/recordings/", recordingsHandler)
http.HandleFunc("/ws", wsHandler)
http.HandleFunc("/ice-servers.json",
func(w http.ResponseWriter, r *http.Request) {
mungeHeader(w)
http.ServeFile(w, r,
filepath.Join(dataDir, "ice-servers.json"))
})
http.HandleFunc("/public-groups.json", publicHandler)
http.HandleFunc("/stats", statsHandler)