Documentation ¶
Overview ¶
Package middleware provides the middleware used by Temporal's APIs
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // DefaultAllowedOrigins are the default allowed origins for the api, allowing for access // via both of our internet uplinks when using the web interface. DefaultAllowedOrigins = []string{"https://temporal.cloud", "https://backup.temporal.cloud"} )
Functions ¶
func CORSMiddleware ¶
func CORSMiddleware(devMode bool, allowedOrigins []string) gin.HandlerFunc
CORSMiddleware is used to load our CORS handling logic
func JwtConfigGenerate ¶
func JwtConfigGenerate(jwtKey, realmName string, db *gorm.DB, l *zap.SugaredLogger) *jwt.GinJWTMiddleware
JwtConfigGenerate is used to generate our JWT configuration
func NewSecWare ¶
func NewSecWare(devMode bool) gin.HandlerFunc
NewSecWare is used to initialize our security middleware
func RequestID ¶
func RequestID() gin.HandlerFunc
RequestID is used to insert a randomly generated uuid as a value to a X-Request-ID header
Types ¶
Click to show internal directories.
Click to hide internal directories.