Как изменить настройку X-Frame-Options?

сейчас получаю ошибку когда пытаюсь отобразить файл в iframe, на фронте.
Refused to display 'http://localhost:8002/app/rest/v2/files/c44ffe1c-d0ae-4200-7559-4f47d3767727?access_token=3c1ffc70-4246-4100-b4be-789311aac80d' in a frame because it set 'X-Frame-Options' to 'deny'.

пробовал способ подмены idp-dispatcher-spring.xml c указанием

<headers>
           <frame-options policy="SAMEORIGIN"/>
</headers>

тоже не сработало

полный файл выглядит так

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:mvc="http://www.springframework.org/schema/mvc"
       xmlns:task="http://www.springframework.org/schema/task"
       xmlns:security="http://www.springframework.org/schema/security"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
           http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
           http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
	       http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security.xsd
           http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd">

    <bean class="com.haulmont.cuba.core.sys.CubaPropertyPlaceholderConfigurer"/>

    <context:annotation-config/>
    <context:component-scan base-package="com.haulmont.addon.idp.idp"/>

    <mvc:annotation-driven/>
    <mvc:resources mapping="/**" location="/idp/"/>

    <mvc:interceptors>
        <bean id="idp_IdpSecurityContextInterceptor" class="com.haulmont.addon.idp.idp.sys.IdpSecurityContextInterceptor"/>
    </mvc:interceptors>

    <bean id="idpScheduler" class="org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler">
        <property name="daemon" value="true"/>
        <property name="poolSize" value="1"/>
        <property name="threadNamePrefix" value="idp_scheduler-"/>
    </bean>

    <task:scheduled-tasks scheduler="idpScheduler">
        <task:scheduled ref="idp_IdpSessionsWatchDog"
                        method="cleanupExpiredSessions"
                        initial-delay="60000"
                        fixed-delay="${cuba.idp.sessionExpirationCheckIntervalMs?:30000}"/>
    </task:scheduled-tasks>

    <security:authentication-manager>
        <security:authentication-provider ref="idp_IdpSpringAuthenticationProvider"/>
    </security:authentication-manager>

    <security:http pattern="/**"
                   create-session="stateless"
                   xmlns="http://www.springframework.org/schema/security">
        <anonymous enabled="true"/>

        <!-- login & logout -->
        <intercept-url pattern="/login" access="permitAll"/>
        <intercept-url pattern="/auth" access="permitAll"/>
        <intercept-url pattern="/logout" access="permitAll"/>

        <intercept-url pattern="/service" access="permitAll"/>

        <form-login login-page="/login"
                    login-processing-url="/auth"
                    default-target-url="/"
                    authentication-failure-url="/login"/>

        <logout logout-success-url="/login"
                logout-url="/logout"/>

        <csrf request-matcher-ref="idpCsrfMatcher"/>
        <!--start-->
        <headers>
            <frame-options policy="SAMEORIGIN"/>
        </headers>
        <!--end-->
    </security:http>

    <bean id="idpCsrfMatcher" class="org.springframework.security.web.util.matcher.OrRequestMatcher">
        <constructor-arg>
            <list value-type="org.springframework.security.web.util.matcher.RequestMatcher">
                <bean class="org.springframework.security.web.util.matcher.AntPathRequestMatcher">
                    <constructor-arg name="pattern" value="/service/**"/>
                </bean>
            </list>
        </constructor-arg>
    </bean>
</beans>

Здравствуйте, не совсем понятно причем здесь idp, попробуйте добавить эту настройку в rest-dispatcher-spring.xml. Пример как его создать: https://doc.cuba-platform.com/restapi-7.2-ru/#rest_api_v2_custom_controllers