Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question, disable csrf for specific endpoint #7

Open
chriamue opened this issue Dec 23, 2018 · 2 comments
Open

Question, disable csrf for specific endpoint #7

chriamue opened this issue Dec 23, 2018 · 2 comments

Comments

@chriamue
Copy link
Contributor

chriamue commented Dec 23, 2018

Do you have a tip, how to disable csrf for some views?
I try to implement this:
`
from flask_wtf import CSRFProtect
csrf = CSRFProtect()

@csrf.exempt

@api.route(git, '/string:project_name/git-receive-pack', methods=('POST',))

def git_receive_pack(project_name):
`

But decorator doesn't work for me.
Is the a parameter for the api.route?

@briancappello
Copy link
Owner

Off the top of my head I'd guess trying to place the route decorator on the top? Can look more closely when I get to a computer

@chriamue
Copy link
Contributor Author

Did not work for me, not on top, not on bot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants