cors settings

master
Matthew 2021-07-03 19:02:52 -04:00
parent aff99a8124
commit 9bfd8bad41
No known key found for this signature in database
GPG Key ID: 210AF32ADE3B5C4B
1 changed files with 7 additions and 0 deletions

View File

@ -2,6 +2,7 @@ package main
import ( import (
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/gin-contrib/cors"
"gitlab.libraryofcode.org/engineering/certificate-api/routes" "gitlab.libraryofcode.org/engineering/certificate-api/routes"
) )
@ -13,5 +14,11 @@ func main() {
router.POST("/parse", routes.GetCertificateInformationEncoded) router.POST("/parse", routes.GetCertificateInformationEncoded)
router.POST("/pgp", routes.GetOpenPGPInformationEncoded) 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() router.Run()
} }