Fixed bug in public api CORS implementation