Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
axetroy committed Oct 3, 2021
1 parent d5026b6 commit c2cacba
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 9 deletions.
5 changes: 3 additions & 2 deletions cmd/whatchanged-server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"net/http"
"os"
"regexp"
"strings"

"github.com/pkg/errors"
"github.com/whatchanged-community/whatchanged"
Expand All @@ -19,8 +20,8 @@ func handler(w http.ResponseWriter, r *http.Request) {
output = bytes.NewBuffer([]byte{})
)
// cors
w.Header().Set("Access-Control-Allow-Origin", r.Header.Get("Origin"))
w.Header().Set("Access-Control-Allow-Methods", http.MethodGet)
w.Header().Set("Access-Control-Allow-Origin", "*")
w.Header().Set("Access-Control-Allow-Methods", strings.Join([]string{http.MethodGet, http.MethodPost, http.MethodPut, http.MethodDelete}, " ,"))

if r.Method == http.MethodOptions {
w.WriteHeader(200)
Expand Down
1 change: 0 additions & 1 deletion playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
},
"dependencies": {
"ant-design-vue": "2.2.8",
"indexof": "0.0.1",
"marked": "3.0.4",
"vue": "3.2.19"
},
Expand Down
2 changes: 1 addition & 1 deletion playground/src/components/CodeMirror.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const props = defineProps({
const { content, readonly, loading } = toRefs(props);
const emit = defineEmit(["update:content"]);
const emit = defineEmits(["update:content"]);
let editor;
Expand Down
5 changes: 0 additions & 5 deletions playground/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -430,11 +430,6 @@ [email protected]:
mkdirp "^0.5.1"
node-fetch "^2.3.0"

[email protected]:
version "0.0.1"
resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d"
integrity sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=

is-binary-path@~2.1.0:
version "2.1.0"
resolved "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09"
Expand Down

0 comments on commit c2cacba

Please sign in to comment.