最近、私はyandexの解析ツールを使用して、あなたの訪問者に関する詳細な情報を提供しています。 。ツールのリンクがある:それは完全に無料yandexのnginxの「X-Frame-Options」ヘッダーを外す
とにかくのYandexのツールmetrica.yandex.comだオプションは、私は
それを使用しようとしたときに訪問者がクリックしてウェブサイト上のほとんどの場所を示した地図を呼ば提供しますエラーメッセージが表示されます。
Not possible to replay visit on the given page. Possible reasons:
Counter code not configured
Displaying this page in a frame is forbidden
そして、私はかなり良いカウンターコードが設定されていることを確信しています。私はヘルプページのリンクを訪れたので、正しい場所に置いておきました:yyex.com/support/metrica/behavior/click-map.html
問題だものを見るために私は
If your site is protected from being shown in an iframe (the X-Frame-Options header is used in the server settings), the collected data won't be available for viewing. To view the site's session data, you must change the server settings and add an exception for the webvisor.com domain and subdomains, as well as for your site's domain. Use the regular expression
、彼らが使用するユーザーに与えるが、マップの仕事をするために設定ファイルに追加する必要があり、コードをnginxのことがわかっ正しく
ので、Iこれを追加しました。これは私の設定ファイルで、2行追加した後です
.....
server_name _;
location/{
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
set $frame_options '';
if ($http_referer !~ '^https?:\/\/([^\/]+\.)?(www.google\.com|webvisor\.com)\/'){
set $frame_options 'SAMEORIGIN';
}
add_header X-Frame-Options $frame_options;
}
.....
私はwww.google.com
と私のドメイン名を変更したが、まだ私はなぜ知らないが、多分私はいくつかのステップを逃した私に見せてエラーが...みんなは私に可能性を提案してください解決策私はこのオプションを多く必要とし、広告をどこに置くことができるかを知るために
ポスト完全nginxの設定ファイル –