Параметры X-Frame Nginx, Iframe Wordpress

Использование Wordpress на Nginx.

Я получаю эти ошибки, но не могу понять, где в параметрах Nginx я указал заголовок DENY.

Multiple 'X-Frame-Options' headers with conflicting values ('SAMEORIGIN, DENY') encountered when loading 'https://beta.com/wp-admin/plugin-install.php?tab=plugin-information&plugin=duplicate-post&'. Falling back to 'DENY'.

Refused to display 'https://beta.com/wp-admin/plugin-install.php?tab=plugin-information&plugin=duplicate-post&' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN, DENY'.

load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery…:2 Uncaught SecurityError: Failed to read the 'contentDocument' property from 'HTMLIFrameElement': Sandbox access violation: Blocked a frame at "https://beta.com" from accessing a frame at "null".  The frame being accessed is sandboxed and lacks the "allow-same-origin" flag.

Есть идеи?

В основных файлах wordpress functions.php я вижу

 * Send a HTTP header to limit rendering of pages to same origin iframes.
 *
 * @since 3.1.3
 *
 * @see https://developer.mozilla.org/en/the_x-frame-options_response_header
 */
function send_frame_options_header() {
    @header( 'X-Frame-Options: SAMEORIGIN' );
}

Но я думаю, это не проблема, поскольку другие пользователи упомянули бы об этом.

1
задан 7 September 2016 в 22:01
1 ответ

Аналогичная проблема была отправлена ​​по адресу:

https://wordpress.org/support/topic/multiple-x-frame-options-headers-with-conflicting-values-sameorigin-deny /

Ответ скопирован сюда для дальнейшего использования, из

https://wordpress.org/support/users/knnleow/

В двух местах одинаковые настройки повторяются.

Я удалил повторяющаяся запись в файле конфигурации

/etc/nginx/site-available/default 

.

Мой

/etc/nginx/snippets/ssl-dhparams.conf 

обновлен до:

#add_header X-Frame-Options DENY;
add_header X-Frame-Options SAMEORIGIN;
5
ответ дан 3 December 2019 в 17:03

Теги

Похожие вопросы