Next.js Discord

Discord Forum

How do I set a proy

Unanswered
Polar bear posted this in #help-forum
Open in Discord
Polar bearOP
I have tried the following

/** @type {import('next').NextConfig} */
const nextConfig = {
    async rewrites() {
        return [
            {
                source: '/backendapi/:path*',
                destination: `http://localhost:7179/:path*`,
            },
        ]
    },
}

export default nextConfig;
  


with a call that does

      const response = await fetch('/backendapi/domains/categories', {
but it still makes call to :3000

0 Replies