Files
DeviceBookingAPI/api/middleware.go
T
2022-11-10 17:19:58 -08:00

15 lines
324 B
Go

package api
import (
"net/http"
)
// Middleware adds some basic header authentication around accessing the routes
func Middleware(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
// Do Authentication stuff?
// use r.URL to get url
next.ServeHTTP(w, r)
})
}