Skip to content

Allowed hosts for rest api request #15225

@fedeizzo

Description

@fedeizzo

Description

I would like to see a config in the api section in order to add allowed hosts for making http request and solve cross origin problem. Now, if a make an async request from browser a cross origin error occurs.

Use case / motivation

If I'm writing a dashboard for a end-user who want to see the current dag status I could create a dag with some graphical js library. The dag is created fetching webserver api in background. A possible implementation could be:

[api]
enable_experimental_api = False
auth_backend = airflow.api.auth.backend.basic_auth
allowed_hosts = ['myDomain1.com', 'myDomain2.org']

Are you willing to submit a PR?

No

Related Issues

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions