added new membership tests, fix tests, cors for dev

This commit is contained in:
$(pass /github/name)
2024-08-24 21:15:38 +02:00
parent 4274f386f7
commit c03ee0b6d0
8 changed files with 96 additions and 31 deletions

View File

@@ -11,8 +11,8 @@ import (
func CORSMiddleware() gin.HandlerFunc {
logger.Info.Print("Applying CORS")
return cors.New(cors.Config{
AllowOrigins: []string{config.BaseURL}, // Add your frontend URL(s)
AllowMethods: []string{"GET", "POST"}, // "PUT", "PATCH", "DELETE", "OPTIONS"},
AllowOrigins: []string{config.BaseURL, "http://localhost:8080"}, // Add your frontend URL(s)
AllowMethods: []string{"GET", "POST"}, // "PUT", "PATCH", "DELETE", "OPTIONS"},
AllowHeaders: []string{"Origin", "Content-Type", "Accept", "Authorization", "X-Requested-With"},
// ExposeHeaders: []string{"Content-Length"},
AllowCredentials: true,