Redirect /embed/chat and /embed/video to the embedable pages. Closes #110
This commit is contained in:
parent
351fbe8834
commit
99521e6741
15
controllers/embed.go
Normal file
15
controllers/embed.go
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
package controllers
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
//GetChatEmbed gets the embed for chat
|
||||||
|
func GetChatEmbed(w http.ResponseWriter, r *http.Request) {
|
||||||
|
http.Redirect(w, r, "/index-standalone-chat.html", http.StatusMovedPermanently)
|
||||||
|
}
|
||||||
|
|
||||||
|
//GetVideoEmbed gets the embed for video
|
||||||
|
func GetVideoEmbed(w http.ResponseWriter, r *http.Request) {
|
||||||
|
http.Redirect(w, r, "/index-video-only.html", http.StatusMovedPermanently)
|
||||||
|
}
|
@ -35,6 +35,12 @@ func Start() error {
|
|||||||
|
|
||||||
// web config api
|
// web config api
|
||||||
http.HandleFunc("/config", controllers.GetWebConfig)
|
http.HandleFunc("/config", controllers.GetWebConfig)
|
||||||
|
|
||||||
|
// chat embed
|
||||||
|
http.HandleFunc("/embed/chat", controllers.GetChatEmbed)
|
||||||
|
|
||||||
|
// video embed
|
||||||
|
http.HandleFunc("/embed/video", controllers.GetVideoEmbed)
|
||||||
}
|
}
|
||||||
|
|
||||||
port := config.Config.GetPublicWebServerPort()
|
port := config.Config.GetPublicWebServerPort()
|
||||||
|
Loading…
Reference in New Issue
Block a user