cors
This commit is contained in:
parent
b3df3250bb
commit
823dc8d89c
@ -924,7 +924,7 @@ func encodeListGroupUsersResponse(response ListGroupUsersRes, w http.ResponseWri
|
||||
}
|
||||
|
||||
func encodeListMaResponse(response ListMaRes, w http.ResponseWriter, span trace.Span) error {
|
||||
w.Header().Set("Access-Control-Allow-Origin", "https://manga.syui.ai")
|
||||
w.Header().Set("Access-Control-Allow-Origin", "*")
|
||||
switch response := response.(type) {
|
||||
case *ListMaOKApplicationJSON:
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
@ -1263,7 +1263,7 @@ func encodeListUserCardResponse(response ListUserCardRes, w http.ResponseWriter,
|
||||
}
|
||||
|
||||
func encodeListUserMaResponse(response ListUserMaRes, w http.ResponseWriter, span trace.Span) error {
|
||||
w.Header().Set("Access-Control-Allow-Origin", "https://manga.syui.ai")
|
||||
w.Header().Set("Access-Control-Allow-Origin", "*")
|
||||
switch response := response.(type) {
|
||||
case *ListUserMaOKApplicationJSON:
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
@ -1668,7 +1668,7 @@ func encodeReadGroupResponse(response ReadGroupRes, w http.ResponseWriter, span
|
||||
}
|
||||
|
||||
func encodeReadMaResponse(response ReadMaRes, w http.ResponseWriter, span trace.Span) error {
|
||||
w.Header().Set("Access-Control-Allow-Origin", "https://manga.syui.ai")
|
||||
w.Header().Set("Access-Control-Allow-Origin", "*")
|
||||
switch response := response.(type) {
|
||||
case *MaRead:
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
@ -1736,7 +1736,7 @@ func encodeReadMaResponse(response ReadMaRes, w http.ResponseWriter, span trace.
|
||||
}
|
||||
|
||||
func encodeReadMaOwnerResponse(response ReadMaOwnerRes, w http.ResponseWriter, span trace.Span) error {
|
||||
w.Header().Set("Access-Control-Allow-Origin", "https://manga.syui.ai")
|
||||
w.Header().Set("Access-Control-Allow-Origin", "*")
|
||||
switch response := response.(type) {
|
||||
case *MaOwnerRead:
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
|
@ -924,7 +924,7 @@ func encodeListGroupUsersResponse(response ListGroupUsersRes, w http.ResponseWri
|
||||
}
|
||||
|
||||
func encodeListMaResponse(response ListMaRes, w http.ResponseWriter, span trace.Span) error {
|
||||
w.Header().Set("Access-Control-Allow-Origin", "https://manga.syui.ai")
|
||||
w.Header().Set("Access-Control-Allow-Origin", "*")
|
||||
switch response := response.(type) {
|
||||
case *ListMaOKApplicationJSON:
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
@ -1263,7 +1263,7 @@ func encodeListUserCardResponse(response ListUserCardRes, w http.ResponseWriter,
|
||||
}
|
||||
|
||||
func encodeListUserMaResponse(response ListUserMaRes, w http.ResponseWriter, span trace.Span) error {
|
||||
w.Header().Set("Access-Control-Allow-Origin", "https://manga.syui.ai")
|
||||
w.Header().Set("Access-Control-Allow-Origin", "*")
|
||||
switch response := response.(type) {
|
||||
case *ListUserMaOKApplicationJSON:
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
@ -1668,7 +1668,7 @@ func encodeReadGroupResponse(response ReadGroupRes, w http.ResponseWriter, span
|
||||
}
|
||||
|
||||
func encodeReadMaResponse(response ReadMaRes, w http.ResponseWriter, span trace.Span) error {
|
||||
w.Header().Set("Access-Control-Allow-Origin", "https://manga.syui.ai")
|
||||
w.Header().Set("Access-Control-Allow-Origin", "*")
|
||||
switch response := response.(type) {
|
||||
case *MaRead:
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
@ -1736,7 +1736,7 @@ func encodeReadMaResponse(response ReadMaRes, w http.ResponseWriter, span trace.
|
||||
}
|
||||
|
||||
func encodeReadMaOwnerResponse(response ReadMaOwnerRes, w http.ResponseWriter, span trace.Span) error {
|
||||
w.Header().Set("Access-Control-Allow-Origin", "https://manga.syui.ai")
|
||||
w.Header().Set("Access-Control-Allow-Origin", "*")
|
||||
switch response := response.(type) {
|
||||
case *MaOwnerRead:
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
|
Loading…
Reference in New Issue
Block a user