Make WordPress Core

Ticket #42313: 42313.2.diff

File 42313.2.diff, 892 bytes (added by joostdevalk, 7 years ago)

Patch v2

  • wp-includes/pluggable.php

     
    12131213        if ( !$is_IIS && PHP_SAPI != 'cgi-fcgi' )
    12141214                status_header($status); // This causes problems on IIS and some FastCGI setups
    12151215
     1216        /**
     1217         * Filters the x-redirect-by header, allows applications to identify themselves when they're doing a redirect.
     1218         *
     1219         * @since 5.0
     1220         *
     1221         * @param string $x_redirect_by The application doing the redirect.
     1222         * @param int    $status        Status code to use.
     1223         * @param string $location      The path to redirect to.
     1224         */
     1225        $x_redirect_by = apply_filters( 'x_redirect_by', 'WordPress', $status, $location );
     1226        header( sprintf( "X-Redirect-By: %s", $x_redirect_by  ) );
     1227
    12161228        header("Location: $location", true, $status);
    12171229
    12181230        return true;