Skip to content

Commit

Permalink
Add cors to sandbox jitprovisioner (#6900)
Browse files Browse the repository at this point in the history
  • Loading branch information
zwinnerman-fleetdm authored Jul 26, 2022
1 parent 6c1d74f commit 7ff2c3d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions infrastructure/sandbox/JITProvisioner/lambda/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ require (
github.com/akrylysov/algnhsa v0.12.1
github.com/aws/aws-sdk-go v1.44.25
github.com/fleetdm/fleet/v4 v4.1.0
github.com/gin-contrib/cors v1.3.0
github.com/gin-gonic/gin v1.7.7
github.com/jessevdk/go-flags v1.5.0
github.com/loopfz/gadgeto v0.11.2
Expand Down
1 change: 1 addition & 0 deletions infrastructure/sandbox/JITProvisioner/lambda/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4
github.com/ghodss/yaml v0.0.0-20180820084758-c7ce16629ff4/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/gin-contrib/cors v1.3.0 h1:PolezCc89peu+NgkIWt9OB01Kbzt6IP0J/JvkG6xxlg=
github.com/gin-contrib/cors v1.3.0/go.mod h1:artPvLlhkF7oG06nK8v3U8TNz6IeX+w1uzCSEId5/Vc=
github.com/gin-contrib/sse v0.0.0-20190125020943-a7658810eb74/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s=
github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s=
Expand Down
3 changes: 2 additions & 1 deletion infrastructure/sandbox/JITProvisioner/lambda/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package main

import (
"github.com/akrylysov/algnhsa"
//"github.com/gin-contrib/cors" TODO: use cors
"github.com/gin-contrib/cors"
"github.com/gin-gonic/gin"
flags "github.com/jessevdk/go-flags"
//"github.com/juju/errors"
Expand Down Expand Up @@ -249,6 +249,7 @@ func main() {

r := gin.Default()
r.Use(apmgin.Middleware(r))
r.Use(cors.Default())
f := fizz.NewFromEngine(r)
infos := &openapi.Info{
Title: "Fleet Demo JITProvisioner",
Expand Down

0 comments on commit 7ff2c3d

Please sign in to comment.