0

I'm try to setup rewrites to deal with CORS issue

but the destination with status code 301 caused the client to fetch from the destination nextjs version 12.2.3

  async rewrites() {
    return [
 
      {
        source: "/google-image/",
        destination:
          "https://serpapi.com/search.json?engine=google_images&q=Coffee&location=Austin%2C+TX%2C+Texas%2C+United+States&google_domain=google.com&gl=us&hl=en&api_key={mykey}",
      },
    ];
  },

enter image description here

enter image description here

0 Answers0