29 Mei 2026

This commit is contained in:
[Valentino Heman Budiarto]
2026-05-29 18:55:54 +07:00
parent d2c6fb0d69
commit 5e005e8524
12 changed files with 29 additions and 23 deletions
+1 -1
View File
@@ -79,7 +79,7 @@ func main() {
func CORSMiddleware() gin.HandlerFunc {
return func(c *gin.Context) {
c.Writer.Header().Set("Access-Control-Allow-Origin", "http://localhost:3000")
c.Writer.Header().Set("Access-Control-Allow-Origin", "*")
c.Writer.Header().Set("Access-Control-Allow-Credentials", "true")
c.Writer.Header().Set("Access-Control-Allow-Headers", "Content-Type, Content-Length, Accept-Encoding, X-CSRF-Token, Authorization, accept, origin, Cache-Control, X-Requested-With")
c.Writer.Header().Set("Access-Control-Allow-Methods", "POST, OPTIONS, GET, PUT, PATCH")