diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/http.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/http.go b/src/http.go index 27bea85..0eadd57 100644 --- a/src/http.go +++ b/src/http.go @@ -259,6 +259,7 @@ func readFileToResponse(w http.ResponseWriter, path string) { // getChallenges returns all challenges func getChallenges(w http.ResponseWriter, r *http.Request) { + challenges := dbGetAllChallenges() var strippedChallenges []StrippedChallenge @@ -284,6 +285,7 @@ func getChallenges(w http.ResponseWriter, r *http.Request) { // set the json header and write the marshaled challenges to the response // writer w.Header().Set("Content-Type", "application/json") + w.Header().Set("Access-Control-Allow-Origin", "*") fmt.Fprintf(w, string(marshalled)) } |