gorilla / csrf

Package gorilla/csrf provides Cross Site Request Forgery (CSRF) prevention middleware for Go web applications & services 🔒

Home Page:https://gorilla.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[bug] Change default request header onto custom

kubitre opened this issue · comments

Describe the bug
While sending request from my frontend i found that frontend http client setting up cookie into headers. I also found custom option for request header. But that does not work.

Versions

Go version: go version go1.15.4 linux/amd64
package version: 3cab164ede93be0d8021150e336fc8eb9b2d1ccd

Steps to Reproduce

How can the bug be triggered?
Use fetch api client. Setting up csrf with custom requestheader name

Expected behavior

What output or behaviour were you expecting instead?
I want the non-standard request header to be read from headers and not from cookies

Scrennshots:
image
image
image

ok, thanks

commented

This issue has been automatically marked as stale because it hasn't seen a recent update. It'll be automatically closed in a few days.