airflow-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitriy Krasnikov <>
Subject CSRF token issue when using POST in flask_blueprints in the Plugin
Date Mon, 29 Aug 2016 12:25:27 GMT

Hi, I was trying to ask this question on Stackoverflow, but I don't think anybody monitors

I am trying to leverage plugins in airflow to implement REST calls to meta database. I created
new tables, but while GET works fine, the POST and PUT generate CSRF token missing or incorrect

from airflow.plugins_manager import AirflowPlugin  
from flask import Blueprint
asset = Blueprint('turbine_plugin', __name__, url_prefix='/api/asset')

@asset.route('/', methods=['POST'])
def insert():
    Inserts new Asset.
    :return: 200 on success.

class TurbinePlugin(AirflowPlugin):
    name = "turbine_plugin"
    flask_blueprints = [asset]

what should I include or do to use POST in ariflow plugins, I see in code that app is CSRF
protected, but how you get token for REST calls?

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message