Skip to content

Commit

Permalink
Merge pull request #168 from Dash-Industry-Forum/fix-cors-eccp
Browse files Browse the repository at this point in the history
fix: add CORS fields needed for ECCP json request
  • Loading branch information
tobbee authored Mar 5, 2024
2 parents 02251f3 + 5e31343 commit 0473eac
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 0473eac

Please sign in to comment.