Fix Error 307 When Calling /wp-json/wiserw/v1/review API (Cloudflare Settings)

If your WooCommerce site returns Error 307 when calling the WiserReview API endpoint /wp-json/wiserw/v1/review The issue is usually related to Cloudflare security or redirect rules that block or redirect API requests.

This guide will help you whitelist and allow the API call through Cloudflare.

1. Understand the Error

A 307 Temporary Redirect means the API request is being redirected instead of reaching your WordPress REST endpoint.

This often happens when Cloudflare or your server adds automatic HTTPS, “Always Use HTTPS,” or page rules that force redirects on /wp-json/* URLs.

2. Whitelist the API Endpoint in Cloudflare

Follow these steps:

  1. Log in to your Cloudflare Dashboard.

  2. Go to Websites → [your domain] → Security → WAF → Tools.

  3. Add a firewall rule or allowlist for:

    /wp-json/wiserw/v1/*
  4. Choose Allow as the action.

  5. Save and deploy the rule.

This ensures that Cloudflare doesn’t block or challenge this API path.

3. Disable Page Rules Affecting REST API

  1. Go to Rules → Page Rules.

  2. Check for any redirect rules like:

    *example.com/*

    or

    *example.com/wp-json/*
  3. Edit or delete rules that force HTTPS redirects or custom caching on the /wp-json/ path.

4. Bypass Cloudflare Cache for API Calls

  1. Go to Caching → Configuration → Cache Rules.

  2. Add a new cache rule:

    If URL path contains /wp-json/
    Then: Bypass cache
  3. Save the rule.

This ensures live API calls are not cached or redirected.

5. Test the API Again

After saving all rules:

  1. Clear your browser cache and Cloudflare cache.

  2. Rerun this API call:

    https://yourdomain.com/wp-json/wiserw/v1/review
  3. It should now return a valid JSON response instead of a 307 redirect.

Optional: Check Server or Plugin Redirects

If you still get redirected:

  • Disable any plugin that forces HTTPS or redirects (like Really Simple SSL) temporarily.

  • Check .htaccess for redirect rules affecting /wp-json/.

  • Ensure that your WordPress Site’s URL and Home URL both use the same HTTPS domain.

Was this helpful?