Skip to content

Commit 74d57af

Browse files
committed
⏪ Revert
1 parent d6d3c44 commit 74d57af

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

app/middleware/cors.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func Cors() gin.HandlerFunc {
3838
c.Header("Server", "busuanzi-by-xcsoft/"+config.VERSION)
3939
if c.Request.Method == http.MethodOptions {
4040
c.Header("Access-Control-Allow-Methods", "GET, POST, HEAD, OPTIONS")
41-
c.Header("Access-Control-Allow-Headers", "x-bsz-referer, Authorization, Content-Type")
41+
c.Header("Access-Control-Allow-Headers", "x-bsz-referer, Authorization")
4242
c.Header("Access-Control-Max-Age", "86400")
4343
if corsPass {
4444
c.AbortWithStatus(204)

dist/busuanzi.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
// set user identity
3535
let token: string | null = localStorage.getItem(storageName);
3636
if (token != null) xhr.setRequestHeader("Authorization", "Bearer " + token);
37-
xhr.setRequestHeader("Content-Type", "application/json");
3837
xhr.setRequestHeader("x-bsz-referer", window.location.href);
3938
xhr.onreadystatechange = function () {
4039
if (xhr.readyState === 4) {

0 commit comments

Comments
 (0)