Skip to content

Commit

Permalink
refactor: disable CORS config
Browse files Browse the repository at this point in the history
  • Loading branch information
nosdrahcirvsky committed Apr 12, 2024
1 parent 174a555 commit c940581
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
"path/filepath"
"time"

"github.com/gin-contrib/cors"
"github.com/gin-gonic/gin"
"github.com/google/uuid"
"github.com/joho/godotenv"
Expand Down Expand Up @@ -61,9 +60,9 @@ func main() {
r.SetTrustedProxies([]string{"127.0.0.1"})

// CORS middleware configuration
config := cors.DefaultConfig()
config.AllowOrigins = []string{"*"}
r.Use(cors.New(config))
// config := cors.DefaultConfig()
// config.AllowOrigins = []string{"*"}
// r.Use(cors.New(config))

r.POST("/storage-service/upload", func(c *gin.Context) {
// Get the file from the request
Expand Down

0 comments on commit c940581

Please sign in to comment.