class AddResponseHeader:
    def process_response(self, req, resp, resource):
        resp.set_header('Access-Control-Allow-Origin', 'http://localhost:8000')

components = [AddResponseHeader()]

class AddResponseHeader:
    def process_response(self, req, resp, resource):
        resp.set_header('Access-Control-Allow-Origin', 'http://localhost:8000')
        resp.set_header('Access-Control-Allow-Methods', 'GET, POST, PUT')
        resp.set_header('Access-Control-Allow-Headers', 'Content-Type')

components = [AddResponseHeader()]

Fix API access control headers