diff --git a/backend/main.go b/backend/main.go index 16e06e7..360c42d 100644 --- a/backend/main.go +++ b/backend/main.go @@ -40,13 +40,21 @@ func getCORSConfig(env string) cors.Config { } case "prod": return cors.Config{ - AllowOrigins: []string{"https://ocboapps.davaocity.gov.ph", "https://esign.patalcala.com", "http://localhost:8080", "http://127.0.0.1:8080"}, + AllowOrigins: []string{"https://ocboapps.davaocity.gov.ph", "https://esign.patalcala.com"}, AllowMethods: []string{"GET", "POST", "OPTIONS", "DELETE"}, // AllowHeaders: []string{"Origin", "OCBO-Token", "Content-Length", "Content-Type", "X-Server", "Authorization"}, AllowHeaders: []string{"*"}, ExposeHeaders: []string{"Content-Length"}, AllowCredentials: true, } + case "lan": + return cors.Config{ + AllowOrigins: []string{"*"}, + AllowMethods: []string{"GET", "POST", "OPTIONS", "DELETE"}, + AllowHeaders: []string{"*"}, + ExposeHeaders: []string{"Content-Length"}, + AllowCredentials: true, + } default: return cors.DefaultConfig() }