Created
July 24, 2015 01:03
-
-
Save petenelson/17d61029dc0834aa06a5 to your computer and use it in GitHub Desktop.
WordPress REST API: Force Link rel header to https
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'rest_url', 'force_https_rest_url', 10, 4 ); | |
function force_https_rest_url( $url, $path, $blog_id, $scheme ) { | |
return set_url_scheme( $url, 'https' ); // force the Link header to be https | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment