Fixed compilation issue on server component, enabled CORS