Fix CORS bugs

This service provider needs tests!