sudiptob2 commented on code in PR #37638:
URL: https://github.com/apache/airflow/pull/37638#discussion_r1509401512
##########
airflow/www/app.py:
##########
@@ -70,7 +72,27 @@
def create_app(config=None, testing=False):
"""Create a new instance of Airflow WWW app."""
- flask_app = Flask(__name__)
+ connexion_app = connexion.FlaskApp(__name__)
+
+ @connexion_app.app.before_request
+ def before_request():
+ """Exempts the view function associated with '/api/v1' requests from
CSRF protection."""
+ if request.path.startswith("/api/v1"): # TODO: make sure this path is
correct
Review Comment:
So this is OK to exempt like this
```python3
request.path.startswith("/api/v1")
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]