www.marcodelogu.com/:1 Uncaught (in promise)
 {code: ‘rest_not_logged_in’, message: ‘You are not currently logged in.’, data: {…}}
 code
 :
 “rest_not_logged_in”
 data
 :
 {status: 401}
 message
 :
 “You are not currently logged in.”
 [[Prototype]]
 :
 Object
I’m confirming that a persistent 401 Unauthorized error is generated on my page for anonymous users/scanners (PageSpeed/Lighthouse).
The error trace shows that the call is initiated by the WordPress Core library: wp-includes/js/dist/api-fetch.min.js.
The actual API request that fails is: GET /wp-json/wp/v2/users/me?context=edit&_locale=user
The core issue is that the SiteOrigin Widgets Bundle (or the Page Builder) is enqueueing code that triggers this API call—which requires a logged-in user (context=edit)—on the public frontend, even when the visitor is anonymous.
Could you please provide a PHP filter or snippet to place in functions.php to prevent the SiteOrigin scripts from enqueueing or executing this specific API call when the user is not logged in (!is_user_logged_in())?