Skip to content

Commit

Permalink
fix: add CORS fields needed for ECCP json request
Browse files Browse the repository at this point in the history
  • Loading branch information
tobbee committed Mar 5, 2024
1 parent 195acdc commit 5e31343
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/livesim2/app/middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ func addVersionAndCORSHeaders(next http.Handler) http.Handler {
fn := func(w http.ResponseWriter, r *http.Request) {
w.Header().Add("DASH-IF-livesim2", internal.GetVersion())
w.Header().Add("Access-Control-Allow-Origin", "*")
w.Header().Add("Access-Control-Allow-Methods", "POST, GET, HEAD, OPTIONS")
w.Header().Add("Access-Control-Allow-Headers", "Content-Type, Accept")
w.Header().Add("Timing-Allow-Origin", "*")
next.ServeHTTP(w, r)
}
Expand Down

0 comments on commit 5e31343

Please sign in to comment.