Skip to content

Commit

Permalink
feat: enabled cors for changelog-remote
Browse files Browse the repository at this point in the history
  • Loading branch information
axetroy committed Nov 24, 2020
1 parent e064058 commit 8b5f7fb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/changelog-remote/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ func generate(remote string, version string) ([]byte, error) {
}

func handler(w http.ResponseWriter, r *http.Request) {
// cors
w.Header().Set("Access-Control-Allow-Origin", r.Header.Get("Origin"))
w.Header().Set("Access-Control-Allow-Methods", "GET")

query := r.URL.Query()

username := query.Get("username")
Expand Down

0 comments on commit 8b5f7fb

Please sign in to comment.