| 3e3af55 | | | 1 | import type { NextConfig } from "next"; |
| 3e3af55 | | | 2 | |
| f0bb192 | | | 3 | const GROVE_HUB_API_URL = process.env.GROVE_HUB_API_URL ?? "http://localhost:4001"; |
| f0bb192 | | | 4 | const GROVE_API_URL = process.env.GROVE_API_URL ?? "http://localhost:4000"; |
| 3e3af55 | | | 5 | const nextConfig: NextConfig = { |
| 135dfe5 | | | 6 | output: "standalone", |
| 9f470a7 | | | 7 | allowedDevOrigins: ["grove.test", "collab.grove.test", "canopy.grove.test", "ring.grove.test"], |
| 3e3af55 | | | 8 | async rewrites() { |
| 3e3af55 | | | 9 | return [ |
| 3c994d3 | | | 10 | { |
| f0bb192 | | | 11 | source: "/api/auth/:path*", |
| f0bb192 | | | 12 | destination: `${GROVE_HUB_API_URL}/api/auth/:path*`, |
| f0bb192 | | | 13 | }, |
| f0bb192 | | | 14 | { |
| f0bb192 | | | 15 | source: "/api/instances/:path*", |
| f0bb192 | | | 16 | destination: `${GROVE_HUB_API_URL}/api/instances/:path*`, |
| f0bb192 | | | 17 | }, |
| 4dfd09b | | | 18 | { |
| 4dfd09b | | | 19 | source: "/api/instances", |
| 4dfd09b | | | 20 | destination: `${GROVE_HUB_API_URL}/api/instances`, |
| 4dfd09b | | | 21 | }, |
| 79efd41 | | | 22 | { |
| 79efd41 | | | 23 | source: "/api/orgs/:path*", |
| 79efd41 | | | 24 | destination: `${GROVE_HUB_API_URL}/api/orgs/:path*`, |
| 79efd41 | | | 25 | }, |
| 79efd41 | | | 26 | { |
| 79efd41 | | | 27 | source: "/api/orgs", |
| 79efd41 | | | 28 | destination: `${GROVE_HUB_API_URL}/api/orgs`, |
| 79efd41 | | | 29 | }, |
| 1da9874 | | | 30 | { |
| 1da9874 | | | 31 | source: "/api/canopy/:path*", |
| 1da9874 | | | 32 | destination: `${GROVE_API_URL}/api/canopy/:path*`, |
| 1da9874 | | | 33 | }, |
| d9e3295 | | | 34 | { |
| d9e3295 | | | 35 | source: "/api/ring/:path*", |
| d9e3295 | | | 36 | destination: `${GROVE_API_URL}/api/ring/:path*`, |
| d9e3295 | | | 37 | }, |
| f0bb192 | | | 38 | { |
| f0bb192 | | | 39 | source: "/api/repos/:path*", |
| f0bb192 | | | 40 | destination: `${GROVE_API_URL}/api/repos/:path*`, |
| 3c994d3 | | | 41 | }, |
| 85f7497 | | | 42 | { |
| 85f7497 | | | 43 | source: "/api/pages/:path*", |
| 85f7497 | | | 44 | destination: `${GROVE_API_URL}/api/pages/:path*`, |
| 85f7497 | | | 45 | }, |
| 3e3af55 | | | 46 | ]; |
| 3e3af55 | | | 47 | }, |
| 3e3af55 | | | 48 | }; |
| 3e3af55 | | | 49 | |
| 3e3af55 | | | 50 | export default nextConfig; |