这是indexloc提供的服务,不要输入任何密码
Skip to content

Question, disable csrf for specific endpoint #7

@chriamue

Description

@chriamue

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions