From c405882943ef163408c4c7efb45e15043b7fb424 Mon Sep 17 00:00:00 2001 From: Jonas Kaninda Date: Mon, 28 Oct 2024 10:17:55 +0100 Subject: [PATCH] chore: default configuration --- pkg/config.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkg/config.go b/pkg/config.go index 210989f..5c592c9 100644 --- a/pkg/config.go +++ b/pkg/config.go @@ -262,7 +262,14 @@ func initConfig(configFile string) { Rewrite: "/", HealthCheck: "", Blocklist: []string{}, - Cors: Cors{}, + Cors: Cors{ + Origins: []string{"http://localhost:3000", "https://dev.example.com"}, + Headers: map[string]string{ + "Access-Control-Allow-Headers": "Origin, Authorization", + "Access-Control-Allow-Credentials": "true", + "Access-Control-Max-Age": "1728000", + }, + }, Middlewares: []RouteMiddleware{ { Path: "/user",