Title: 403 errors
Last modified: December 19, 2025

---

# 403 errors

 *  Resolved [thartl](https://wordpress.org/support/users/hartl/)
 * (@hartl)
 * [5 months, 3 weeks ago](https://wordpress.org/support/topic/403-errors-13/)
 * Cached nonces don’t work after 12-24 hours, so Meow Lightbox now only works on
   pages without caching. Is there any way you can look into that?
 * As to your previous suggestion, with Rendering Delay at 0, Meow Lightbox doesn’t
   seem to work with Meow Gallery.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Support [Val Meow](https://wordpress.org/support/users/valwa/)
 * (@valwa)
 * [5 months ago](https://wordpress.org/support/topic/403-errors-13/#post-18774518)
 * Hey [@hartl](https://wordpress.org/support/users/hartl/)! 👋
 * Make sure you haven’t disabled the cache in the lightbox settings, otherwise 
   the nonce must be valid to fetch your media data. If the cache is enabled, no
   request will be made after the data has already been cached, this should solve
   your issue.
 * Setting the Rendering Delay to 0 will completely turn off the media request, 
   so if nothing is cached, it results in empty lightbox data.
 * The next version of the lightbox will include an option to completely bypass 
   any request while still rendering your media in the lightbox. For now, enabling
   the cache should solve your issue.
 * Hope this helps!
 *  Thread Starter [thartl](https://wordpress.org/support/users/hartl/)
 * (@hartl)
 * [5 months ago](https://wordpress.org/support/topic/403-errors-13/#post-18775314)
 *  Hi [@valwa](https://wordpress.org/support/users/valwa/),
 * Thank you for the suggestion. However, on all sites where this issue is occurring
   the plugin’s cache is NOT disabled. The issue is with full-page caching.
 * When a page with Meow Lightbox images is first cached, that includes the nonce
   at that time. Then 12-24 hours later that nonce becomes stale, which leads to
   the 403 errors.
 * In my opinion the solution is not using `X-WP-Nonce` in your regenerate_mwl_data
   POST request. There may be other solutions, but that would seem sensible for 
   guest users at least.
 *  Plugin Support [Val Meow](https://wordpress.org/support/users/valwa/)
 * (@valwa)
 * [4 months, 2 weeks ago](https://wordpress.org/support/topic/403-errors-13/#post-18797386)
 * Hey [@hartl](https://wordpress.org/support/users/hartl/)! 👋 
   The regenerate_mwl_data
   route already does not have a permission callback, so if you want to bypass any
   nonce check you can use a filter like this:
 *     ```wp-block-code
       add_filter( 'rest_authentication_errors', function ( $result ) {
           if ( ! empty( $result ) ) {
               return $result;
           }
   
           $uri = $_SERVER['REQUEST_URI'] ?? '';
           if ( strpos( $uri, '/wp-json/meow-lightbox/v1/regenerate_mwl_data' ) !== false ) {
               return true; // bypass cookie auth for this route
           }
   
           return $result;
       }, 99 );
       ```
   
 * That said, rather than doing this, I would recommend using the plugin cache and
   Output Buffering and disabling REST calls, so no REST request is made if a page
   already has the needed lightbox data. You can learn more about this here: [https://photo.thehiddendocs.com/tutorials/dynamic-media-loading/](https://photo.thehiddendocs.com/tutorials/dynamic-media-loading/)
 * Hope this helps!

Viewing 3 replies - 1 through 3 (of 3 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2F403-errors-13%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/meow-lightbox/assets/icon-256x256.gif?rev=3004933)
 * [Meow Lightbox](https://wordpress.org/plugins/meow-lightbox/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/meow-lightbox/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/meow-lightbox/)
 * [Active Topics](https://wordpress.org/support/plugin/meow-lightbox/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/meow-lightbox/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/meow-lightbox/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Val Meow](https://wordpress.org/support/users/valwa/)
 * Last activity: [4 months, 2 weeks ago](https://wordpress.org/support/topic/403-errors-13/#post-18797386)
 * Status: resolved