mirror of
https://github.com/rls-moe/nyx
synced 2024-11-16 22:12:24 +00:00
13 lines
206 B
Go
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{}))
|
||
|
}
|