0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Referrer-Policy

0
Posted at

概要

HTTPレスポンスヘッダの1つである、Referrer-Policy についてまとめる。

Referrer-Policy とは

ブラウザが、Refererヘッダ(直前に閲覧していたページURL)をどう扱うかを制御するレスポンスヘッダのこと。

主なディレクティブ

  • no-referer
    • Refererヘッダーを一切送らない。安全だが、参照元解析(アクセス解析や広告トラッキング)に影響する場合あり。
  • no-referer-when-downgrade
    • HTTP→HTTPS には送信するが、HTTPS→HTTP には送信しない
  • origin
  • origin-when-cross-origin
    • 同一オリジンにはフルURL、クロスオリジンにはオリジン部分のみ送信する
  • same-origin
    • 同一オリジンにはフルURL、クロスオリジンには送信しない
  • strict-origin
    • 同一スキームの場合はオリジンを送信、HTTPS→HTTPは送信しない
  • strict-origin-when-cross-origin(推奨値)
    • 同一オリジンにはフルURL、クロスオリジンにはオリジンのみ、HTTPS→HTTPは送信しない
  • unsafe-url
    • 常にフルURLを送信(安全ではないので、推奨されない)
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?