0
0
mirror of https://github.com/rls-moe/nyx synced 2024-09-28 16:03:47 +02:00
nyx/vendor/github.com/justinas/nosurf/handler_go17.go
2017-03-12 20:37:53 +01:00

13 lines
206 B
Go

// +build go1.7
package nosurf
import (
"context"
"net/http"
)
func addNosurfContext(r *http.Request) *http.Request {
return r.WithContext(context.WithValue(r.Context(), nosurfKey, &csrfContext{}))
}