From 9bfd8bad4116763279d8cc535874c3e5bd1cd295 Mon Sep 17 00:00:00 2001 From: Matthew R Date: Sat, 3 Jul 2021 19:02:52 -0400 Subject: [PATCH] cors settings --- cmd/main.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cmd/main.go b/cmd/main.go index 773787d..a0c3053 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -2,6 +2,7 @@ package main import ( "github.com/gin-gonic/gin" + "github.com/gin-contrib/cors" "gitlab.libraryofcode.org/engineering/certificate-api/routes" ) @@ -12,6 +13,12 @@ func main() { router.GET("/tls", routes.GetCertificateInfo) router.POST("/parse", routes.GetCertificateInformationEncoded) router.POST("/pgp", routes.GetOpenPGPInformationEncoded) + + + router.POST("/encoding/pgp/armor-binary", routes.PGPArmorToBinary) + router.POST("/encoding/x509/pem-der", routes.X509PEMToDER) + router.POST("/encoding/x509/der-pem", routes.X509DERtoPEM) + router.Use(cors.Default()) router.Run() }