mirror of
https://github.com/owncast/owncast.git
synced 2024-11-24 13:50:06 +03:00
Fix embeds not loading on prod builds. Closes #2186
This commit is contained in:
parent
902f21b361
commit
d94723bd3a
2 changed files with 0 additions and 43 deletions
|
@ -1,31 +0,0 @@
|
|||
package controllers
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/owncast/owncast/router/middleware"
|
||||
)
|
||||
|
||||
// GetChatEmbedreadwrite gets the embed for readwrite chat.
|
||||
func GetChatEmbedreadwrite(w http.ResponseWriter, r *http.Request) {
|
||||
// Set our global HTTP headers
|
||||
middleware.SetHeaders(w)
|
||||
|
||||
http.ServeFile(w, r, "webroot/index-standalone-chat-readwrite.html")
|
||||
}
|
||||
|
||||
// GetChatEmbedreadonly gets the embed for readonly chat.
|
||||
func GetChatEmbedreadonly(w http.ResponseWriter, r *http.Request) {
|
||||
// Set our global HTTP headers
|
||||
middleware.SetHeaders(w)
|
||||
|
||||
http.ServeFile(w, r, "webroot/index-standalone-chat-readonly.html")
|
||||
}
|
||||
|
||||
// GetVideoEmbed gets the embed for video.
|
||||
func GetVideoEmbed(w http.ResponseWriter, r *http.Request) {
|
||||
// Set our global HTTP headers
|
||||
middleware.SetHeaders(w)
|
||||
|
||||
http.ServeFile(w, r, "webroot/index-video-only.html")
|
||||
}
|
|
@ -58,18 +58,6 @@ func Start() error {
|
|||
// web config api
|
||||
http.HandleFunc("/api/config", controllers.GetWebConfig)
|
||||
|
||||
// pre v0.0.8 chat embed
|
||||
http.HandleFunc("/embed/chat", controllers.GetChatEmbedreadonly)
|
||||
|
||||
// readonly chat embed
|
||||
http.HandleFunc("/embed/chat/readonly", controllers.GetChatEmbedreadonly)
|
||||
|
||||
// readwrite chat embed
|
||||
http.HandleFunc("/embed/chat/readwrite", controllers.GetChatEmbedreadwrite)
|
||||
|
||||
// video embed
|
||||
http.HandleFunc("/embed/video", controllers.GetVideoEmbed)
|
||||
|
||||
// return the YP protocol data
|
||||
http.HandleFunc("/api/yp", yp.GetYPResponse)
|
||||
|
||||
|
|
Loading…
Reference in a new issue