Skip to content

πŸ“š The open-source, offline-first Notion, Obsidian & Confluence alternative. Advanced Markdown, multi-tenant teams, OIDC/SSO, and local S3 backups. Deploy in one command.

Fix cors

Smaug6739361819d8eeb3
diff --git a/backend/router/router.go b/backend/router/router.go
index 945de454..edc22df6 100644
--- a/backend/router/router.go
+++ b/backend/router/router.go
@@ -3,6 +3,7 @@ package router
import (
"alexandrie/app"
"alexandrie/router/routes"
+ "fmt"
"os"
"github.com/gin-contrib/cors"
@@ -16,6 +17,7 @@ func InitRouter(app *app.App) *gin.Engine {
// Configurer les proxys et CORS
router.SetTrustedProxies([]string{"127.0.0.1", "localhost"})
+ fmt.Println(os.Getenv("DOMAIN_CLIENT"))
router.Use(cors.New(cors.Config{
AllowOrigins: []string{os.Getenv("DOMAIN_CLIENT")},
AllowMethods: []string{"GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"},