Enable CORS on /status
This commit is contained in:
parent
38127bed77
commit
cd53e108f3
2
main.go
2
main.go
@ -72,6 +72,8 @@ func enableCors(w *http.ResponseWriter) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func getStatus(w http.ResponseWriter, r *http.Request) {
|
func getStatus(w http.ResponseWriter, r *http.Request) {
|
||||||
|
enableCors(&w)
|
||||||
|
|
||||||
status := Status{
|
status := Status{
|
||||||
Online: stats.IsStreamConnected(),
|
Online: stats.IsStreamConnected(),
|
||||||
ViewerCount: stats.GetViewerCount(),
|
ViewerCount: stats.GetViewerCount(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user