From fc238b4f66f3bba701fd2caec9bec3ff8cb67529 Mon Sep 17 00:00:00 2001 From: Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> Date: Sat, 19 Oct 2024 18:11:01 +0300 Subject: stop pushing local changes idiot --- backend/go.mod | 1 - backend/go.sum | 2 -- backend/main.go | 28 +++++++++++++--------------- 3 files changed, 13 insertions(+), 18 deletions(-) (limited to 'backend') diff --git a/backend/go.mod b/backend/go.mod index ae50685..f6eef48 100644 --- a/backend/go.mod +++ b/backend/go.mod @@ -8,7 +8,6 @@ require ( ) require ( - github.com/gin-contrib/cors v1.7.2 github.com/golang-jwt/jwt/v4 v4.5.0 github.com/google/uuid v1.6.0 github.com/pektezol/steam_go v1.1.2 diff --git a/backend/go.sum b/backend/go.sum index f117b31..10504e4 100644 --- a/backend/go.sum +++ b/backend/go.sum @@ -31,8 +31,6 @@ github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2 github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/gabriel-vasile/mimetype v1.4.5 h1:J7wGKdGu33ocBOhGy0z653k/lFKLFDPJMG8Gql0kxn4= github.com/gabriel-vasile/mimetype v1.4.5/go.mod h1:ibHel+/kbxn9x2407k1izTA1S81ku1z/DlgOW2QE0M4= -github.com/gin-contrib/cors v1.7.2 h1:oLDHxdg8W/XDoN/8zamqk/Drgt4oVZDvaV0YmvVICQw= -github.com/gin-contrib/cors v1.7.2/go.mod h1:SUJVARKgQ40dmrzgXEVxj2m7Ig1v1qIboQkPDTQ9t2E= github.com/gin-contrib/gzip v0.0.6 h1:NjcunTcGAj5CO1gn4N8jHOSIeRFHIbn51z6K+xaN4d4= github.com/gin-contrib/gzip v0.0.6/go.mod h1:QOJlmV2xmayAjkNS2Y8NQsMneuRShOU/kjovCXNuzzk= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= diff --git a/backend/main.go b/backend/main.go index 6499b51..e7a0ede 100644 --- a/backend/main.go +++ b/backend/main.go @@ -4,13 +4,11 @@ import ( "fmt" "log" "os" - "time" "lphub/api" "lphub/database" _ "lphub/docs" - "github.com/gin-contrib/cors" "github.com/gin-gonic/gin" "github.com/joho/godotenv" ) @@ -36,19 +34,19 @@ func main() { database.ConnectDB() api.InitRoutes(router) // for debugging - router.Use(cors.New(cors.Config{ - AllowOrigins: []string{"*"}, - AllowMethods: []string{"GET", "POST", "DELETE", "PUT", "PATCH"}, - AllowHeaders: []string{"Origin"}, - ExposeHeaders: []string{"Content-Length"}, - AllowCredentials: true, - MaxAge: 12 * time.Hour, - })) - router.Static("/static", "../frontend/build/static") - router.StaticFile("/", "../frontend/build/index.html") - router.NoRoute(func(c *gin.Context) { - c.File("../frontend/build/index.html") - }) + // router.Use(cors.New(cors.Config{ + // AllowOrigins: []string{"*"}, + // AllowMethods: []string{"GET", "POST", "DELETE", "PUT", "PATCH"}, + // AllowHeaders: []string{"Origin"}, + // ExposeHeaders: []string{"Content-Length"}, + // AllowCredentials: true, + // MaxAge: 12 * time.Hour, + // })) + // router.Static("/static", "../frontend/build/static") + // router.StaticFile("/", "../frontend/build/index.html") + // router.NoRoute(func(c *gin.Context) { + // c.File("../frontend/build/index.html") + // }) router.MaxMultipartMemory = 200 << 20 // 200 mb limit for demos router.Run(fmt.Sprintf(":%s", os.Getenv("PORT"))) } -- cgit v1.2.3