utensils / barcoded

A barcode generation web service.
utensils.io/barcoded
MIT License
49 stars 5 forks source link

[Closes #20] Add support for CORS #21

Closed jamesbrink closed 10 years ago

jamesbrink commented 10 years ago

RFC @doomspork.

This is for issue #20

Need some input on this one. This is tested and works. I went back and forth on how and where to implement this. Let me know if you have any ideas where else this snippet should sit. Also I should be testing the disabled state of CORS. I am not sure how to test the disabled state, It would require a new instance of the app, or to unload the middleware. In any case, need your input :smile:

coveralls commented 10 years ago

Coverage Status

Coverage remained the same when pulling 02fc6b855f4e46cfbeedd64a344d5736304e66c1 on jamesbrink:enable_cors into 050edda2290b5266b5354f41a772038b90d64c69 on UtensilsUnion:master.

coveralls commented 10 years ago

Coverage Status

Coverage remained the same when pulling 56c72a44226387753da5b2b387f9d5c180798f84 on jamesbrink:enable_cors into 050edda2290b5266b5354f41a772038b90d64c69 on UtensilsUnion:master.

doomspork commented 10 years ago

Why not use sinatra/cross_origin? It leads to much cleaner code, does this Rack library provide something additional?

jamesbrink commented 10 years ago

Ah yeah, that might be much cleaner for this. Let me give that a try. Thanks

doomspork commented 10 years ago

Much cleaner! Like the spec coverage as well.

doomspork commented 10 years ago

Great job @jamesbrink