python-eel/Eel

Is it possible to add headers to enable CORS?

Open

#231 geöffnet am 16. Jan. 2020

Auf GitHub ansehen
 (3 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Python (570 Forks)batch import
help wanted

Repository-Metriken

Stars
 (5.980 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

Hi Samuel,

I would like to use an eel-based App from another web-based system and have that system call eel on localhost. Therefore to allow Cross-Origin Requests i would need my eel-based app add the needed headers. But since the bottle webserver is wrapped inside eel I don't find any obvious way to add the headers. When working directly with bottle you would be able to set them e.g. through: response.headers['Access-Control-Allow-Origin'] = 'http://localhost:8000/'

Is there a way to hand this through eel to the webserver?

Contributor Guide