Some checks failed
Build and Deploy / build (push) Has been cancelled
- Add Next.js rewrites to proxy /api/script.js and /api/track through self-hosted Rybbit - This bypasses ad blockers that would block rybbit.nodecrew.me directly - Add NEXT_PUBLIC_RYBBIT_HOST and NEXT_PUBLIC_RYBBIT_SITE_ID env vars to K8s deployment
48 lines
1.0 KiB
TypeScript
48 lines
1.0 KiB
TypeScript
import createNextIntlPlugin from "next-intl/plugin";
|
|
import type { NextConfig } from "next";
|
|
|
|
const withNextIntl = createNextIntlPlugin();
|
|
|
|
const nextConfig: NextConfig = {
|
|
output: 'standalone',
|
|
async rewrites() {
|
|
const rybbitHost = process.env.NEXT_PUBLIC_RYBBIT_HOST || "https://rybbit.nodecrew.me";
|
|
return [
|
|
{
|
|
source: "/api/script.js",
|
|
destination: `${rybbitHost}/api/script.js`,
|
|
},
|
|
{
|
|
source: "/api/track",
|
|
destination: `${rybbitHost}/api/track`,
|
|
},
|
|
];
|
|
},
|
|
images: {
|
|
remotePatterns: [
|
|
{
|
|
protocol: "https",
|
|
hostname: "manoonoils.com",
|
|
pathname: "/**",
|
|
},
|
|
{
|
|
protocol: "https",
|
|
hostname: "minio-api.nodecrew.me",
|
|
pathname: "/**",
|
|
},
|
|
{
|
|
protocol: "https",
|
|
hostname: "api.manoonoils.com",
|
|
pathname: "/**",
|
|
},
|
|
{
|
|
protocol: "https",
|
|
hostname: "**.saleor.cloud",
|
|
pathname: "/**",
|
|
},
|
|
],
|
|
},
|
|
};
|
|
|
|
export default withNextIntl(nextConfig);
|