#163 Insert CORS headers if some are configured
Merged by ralph. Opened by pingou.
pingou/waiverdb cors_headers  into  master

Download 163.patch

Fixes https://pagure.io/waiverdb/issue/160

Signed-off-by: Pierre-Yves Chibon pingou@pingoured.fr

This is just a proposal for now, it's missing tests (and tbh, I didn't run the tests myself, so I'm not sure that I didn't break it :-])

:+1: to the concept, but are you sure insert_headers is doing what you actually want here? I'm not sure the allowed methods header is the same in all these places.

We talked elsewhere about running the tests. You know now about the need for a postgres instance with a superuser account to run them. Can you give it a try?

Alright, I got the tests running and I can confirm that I at least didn't break them :]

rebased onto 75bc0428df4fda0c5e50ebe00015c25a3a084083

rebased onto 9e830d1df8de2cf22fd78e47601e584465d268f5

Now with unit-tests :)

Thanks. Looks fine to me now on a second read.

@gnaponie, @lholecek, @dcallagh - any other review comments?

+1

... though Python package flask-cors seems to handle this by doing just CORS(flask_app) on single place in code -- it seems to use flask_app.after_request().

True, true.. although we'd have to package python-flask-cors for Fedora. It doesn't seem to be there today. That's not a blocker, but let's save work like that for when we really need it.

Thanks all!

Pull-Request has been merged by ralph

After-party thumbs-up

Metadata