Added response headers and OPTIONS method to make work in browser