Adds a function to allow individual API paths to support CORS requests easily. The function sets headers necessary to allow cookie based authentication. Currently restricted to GETs.