Fixed CORS
This commit is contained in:
@@ -100,14 +100,19 @@ type SongData struct {
|
||||
}
|
||||
|
||||
func indexHandler(w http.ResponseWriter, r *http.Request) {
|
||||
(w).Header().Set("Access-Control-Allow-Origin", "*")
|
||||
if r.URL.Path == "/version" {
|
||||
w.Header().Add("Content-Type", "application/json")
|
||||
|
||||
testf()
|
||||
|
||||
data := VersionData{Version: "2.0.0",
|
||||
Changelog: "Rebuilt the application in Go.",
|
||||
data := VersionData{Version: "2.0.1",
|
||||
Changelog: "Fixed CORS",
|
||||
History: []VersionData{
|
||||
{
|
||||
Version: "2.0.0",
|
||||
Changelog: "Rebuilt the application in Go.",
|
||||
},
|
||||
{
|
||||
Version: "1.2.0",
|
||||
Changelog: "Made the /sync endpoint async. " +
|
||||
|
||||
Reference in New Issue
Block a user