-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix bugs for a multisite environment. #15
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -762,6 +762,14 @@ public function get_auth_header() { | |
$header = sanitize_text_field( $_SERVER['REDIRECT_HTTP_AUTHORIZATION'] ); | ||
} | ||
|
||
//Maybe apache? | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This whole block of code does not adhere to coding standards and is causing phpcs to fail the build. Please update it when you have a chance. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Perhaps it would make more sense to check for the missing header at the same time as the check for the function.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This doesn't have anything to do with Multisite though. Can you describe the problem you're having with Multisite so I can understand why you are changing the rest endpoint? |
||
if( function_exists('apache_request_headers') ) { | ||
$headers = apache_request_headers(); | ||
if (! $header && is_array($headers) && isset($headers['Authorization'])) { | ||
$header = sanitize_text_field( $headers['Authorization'] ); | ||
} | ||
} | ||
|
||
// The HTTP Authorization Header is missing, return an error. | ||
if ( ! $header ) { | ||
return new WP_Error( | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why add the home url here? This will break the tests and would require some additional modifications.