Satoshi-Sh commented on PR #37638:
URL: https://github.com/apache/airflow/pull/37638#issuecomment-1962965779
Yes, it's scope. I have this now.
```
# asgi-csrf skip_if_scope
def skip_api_paths(scope):
return scope["path"].startswith("/api/v1")
flask_app = asgi_csrf(
flask_app,
signing_secret=conf.get_mandatory_value("webserver", "secret_key"),
skip_if_scope=skip_api_paths,
)
```
After changing the code, I get a different error.
`RuntimeError: A secret key is required to use CSRF. INFO: "POST
/api/v1/dags/exmple_bash_operator/dagRuns HTTP/1.1"` instead of something like
`CSRF token is missing` on the same endpoint.
I hope I'm in the right direction to solve the issue.
--
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]