tytanium/routes/serve_auth_check.go

15 lines
282 B
Go

package routes
import (
"github.com/valyala/fasthttp"
"tytanium/security"
)
// ServeAuthCheck validates the master key by calling IsAuthorized.
func ServeAuthCheck(ctx *fasthttp.RequestCtx) {
if !security.IsAuthorized(ctx) {
return
}
ctx.SetStatusCode(fasthttp.StatusOK)
}