You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
474 B
22 lines
474 B
// Code scaffolded by goctl. Safe to edit.
|
|
// goctl 1.9.2
|
|
|
|
package middleware
|
|
|
|
import "net/http"
|
|
|
|
type CorsMiddleware struct {
|
|
}
|
|
|
|
func NewCorsMiddleware() *CorsMiddleware {
|
|
return &CorsMiddleware{}
|
|
}
|
|
|
|
func (m *CorsMiddleware) Handle(next http.HandlerFunc) http.HandlerFunc {
|
|
return func(w http.ResponseWriter, r *http.Request) {
|
|
// TODO generate middleware implement function, delete after code implementation
|
|
|
|
// Passthrough to next handler if need
|
|
next(w, r)
|
|
}
|
|
}
|
|
|