Seems like this issue have been up before. And the issue is filebirds wp-json wont work if you enforce trailing slash. While other works so it must be on your end and should be solved in the core.
Could you patch a fix to support this?
I’ve seen this solution before but it should be addressed in the core. And below doesn’t solve the issue.
if (defined('NJFB_REST_URL')) {
add_filter('filebird_json_url', function(){
return site_url("wp-json/" . NJFB_REST_URL);
});
}
Example code for force trailing slash on wordpress urls.
# Force trailing slash
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_METHOD} GET
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteCond %{REQUEST_FILENAME} !\.(gif|jpg|png|jpeg|css|xml|txt|js|php|scss|webp|mp3|avi|wav|mp4|mov)$ [NC]
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1/ [L,R=301]
</IfModule>
-
This reply was modified 3 years, 5 months ago by Rookie.