Skip to content

Commit

Permalink
test cdn
Browse files Browse the repository at this point in the history
  • Loading branch information
kahlstrm committed Jan 18, 2024
1 parent a11d358 commit a4e10d7
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions apps/web/next.config.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
/** @type {import("next").NextConfig} */
const isProd = process.env.NODE_ENV === "production";
module.exports = {
reactStrictMode: true,
images: {
// TODO: only for dev:
remotePatterns:
process.env.NODE_ENV === "development"
? [
{
protocol: "http",
hostname: "localhost",
port: process.env.PAYLOAD_PORT,
pathname: "/media/**",
},
]
: undefined,
remotePatterns: !isProd
? [
{
protocol: "http",
hostname: "localhost",
port: process.env.PAYLOAD_PORT,
pathname: "/media/**",
},
]
: undefined,
},
assetPrefix: isProd ? "https://cdn.alpha.tietokilta.fi" : undefined,
};

0 comments on commit a4e10d7

Please sign in to comment.