Send a referrer policy header so referrers are not sent externally from administration screens.

Description Description

Source Source

File: wp-admin/includes/misc.php

function wp_admin_headers() {
	$policy = 'same-origin';

	 * Filters the admin referrer policy header value. Default 'same-origin'.
	 * @since 4.9.0
	 * @link https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy
	 * @param string $policy The referrer policy header value.
	$policy = apply_filters( 'admin_referrer_policy', $policy );

	header( sprintf( 'Referrer-Policy: %s', $policy ) );

Top ↑

Changelog Changelog

Version Description
4.9.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.