This will make integrating with greenwave remotely and via JS easier.
Fixes https://pagure.io/greenwave/issue/65
Signed-off-by: Pierre-Yves Chibon pingou@pingoured.fr
I think this is a good feature and that it would be nice to have it, my only concern is with the potential risk of people using it to DDOS the system.
Up to you
Just a thought, would it be cleaner to write a decorator that's used on the route to modify the response to jsonp?
+1. I would prefer to have a decorator like this one https://pagure.io/waiverdb/blob/master/f/waiverdb/utils.py#_60
Yeah, I like this feature.
I'm fine with going the decorator way but it means we need to always specify it while this approach automatically adds JSONP support to all the endpoints in that file
:+1:
I don't see any harm in exposing all the endpoints as JSONP as well. This doesn't introduce any DOS risk that doesn't already exist with the existing endpoints.
I'm letting you folks make the call about adjusting or merging as is.
If you go for the former, I'm happy to do the changes :)
Thanks @pingou! It looks like both @mjia and @mprahl prefer the decorator.
Can you adjust it to use that, and rebase on master.. then I think we should be good (or close) to merge.
master
Ping @pingou. Do you have cycles to finish this one out?
Will do today :)
rebased onto 42d0669111d4095f8d72cadb249ceb60ab950c2d
Thanks Pierre!
Pull-Request has been merged by ralph
This will make integrating with greenwave remotely and via JS easier.
Fixes https://pagure.io/greenwave/issue/65
Signed-off-by: Pierre-Yves Chibon pingou@pingoured.fr