/** @type {import('next').NextConfig} */
// https://stackoverflow.com/questions/76164057/next-js-hostname-not-configured-under-images-in-next-config-js-even-though-remot
const nextConfig = {
    async rewrites() {
		return [
			{
				source: '/backend/:path*',
				destination: `http://192.168.50.107:5580/:path*`,
			},
			{
				source: '/strapi/:path*',
				destination: `http://192.168.50.107:1337/:path*`,
			}
		]
	},
	images: {
		remotePatterns: [
			{
				protocol: "https",
				hostname: "ih1.redbubble.net",
				port: "",
				pathname: "/**",
			},
			{
				protocol: "http",
				hostname: "localhost",
				port: "1337",
				pathname: "/**",
			},
		],
	},
};

export default nextConfig;
