Why did not set expose headers params in rest cors settings?

Hi everyone,

I writed a portal module with angular. I need get X-Total-Count header from rest entity controller. But rest api cors settings does not contain exposeHeader. It is look like

<bean id="cuba_RestCorsConfig" class="org.springframework.web.cors.CorsConfiguration">
    <property name="allowedOrigins" value="${cuba.rest.allowedOrigins}"/>
    <property name="allowedHeaders" value="*"/>
    <property name="allowedMethods" value="*"/>
    <property name="allowCredentials" value="true"/>

Therefore, Browser cors security does not allow acces this custom header. I think that need to add expose header params like this,
<property name="exposedHeaders" value="X-Total-Count" /> or may be thats value set from application properties file.

thanks for letting us know about the problem!
We have an issue about this: https://youtrack.cuba-platform.com/issue/PL-9903