File tree Expand file tree Collapse file tree 3 files changed +17
-6
lines changed
Expand file tree Collapse file tree 3 files changed +17
-6
lines changed Original file line number Diff line number Diff line change @@ -107,9 +107,10 @@ Project maintained on GitHub at [automattic/wordpress-activitypub](https://githu
107107
108108### Next ###
109109
110- * Compatibility: allow deactivating blocks registered by the plugin.
111- * Compatibility: avoid Fatal Errors when using ClassicPress.
112- * Fixed: fix a typo in a hook name.
110+ * Compatibility: allow deactivating blocks registered by the plugin
111+ * Compatibility: avoid Fatal Errors when using ClassicPress
112+ * Fixed: fix a typo in a hook name
113+ * Fixed: a problem with signatures when running WordPress in a sub-path
113114
114115### 1.0.0 ###
115116
Original file line number Diff line number Diff line change @@ -238,6 +238,15 @@ public static function verify_http_signature( $request ) {
238238 } else {
239239 $ route = '/ ' . rest_get_url_prefix () . '/ ' . ltrim ( $ request ->get_route (), '/ ' );
240240 }
241+
242+ // fix route for subdirectory installs
243+ $ path = wp_parse_url ( get_home_url (), PHP_URL_PATH );
244+ $ path = trim ( $ path , '/ ' );
245+
246+ if ( $ path ) {
247+ $ route = '/ ' . $ path . $ route ;
248+ }
249+
241250 $ headers = $ request ->get_headers ();
242251 $ headers ['(request-target) ' ][0 ] = strtolower ( $ request ->get_method () ) . ' ' . $ route ;
243252 } else {
Original file line number Diff line number Diff line change @@ -107,9 +107,10 @@ Project maintained on GitHub at [automattic/wordpress-activitypub](https://githu
107107
108108= Next =
109109
110- * Compatibility: allow deactivating blocks registered by the plugin.
111- * Compatibility: avoid Fatal Errors when using ClassicPress.
112- * Fixed: fix a typo in a hook name.
110+ * Compatibility: allow deactivating blocks registered by the plugin
111+ * Compatibility: avoid Fatal Errors when using ClassicPress
112+ * Fixed: fix a typo in a hook name
113+ * Fixed: a problem with signatures when running WordPress in a sub-path
113114
114115= 1.0.0 =
115116
You can’t perform that action at this time.
0 commit comments