27 lines
756 B
TypeScript
27 lines
756 B
TypeScript
import type { NextConfig } from 'next';
|
|
|
|
/* Public PocketBase host for the image optimizer allowlist.
|
|
* Derived from PB_PUBLIC_URL (e.g. https://cms.allmy.work) at BUILD time —
|
|
* remotePatterns is frozen into the build, so PB_PUBLIC_URL must be present
|
|
* during `next build` in CI (via build-arg), not just at runtime. */
|
|
const pbPublicHost = process.env.PB_PUBLIC_URL ? new URL(process.env.PB_PUBLIC_URL).hostname : '127.0.0.1';
|
|
|
|
const nextConfig: NextConfig = {
|
|
output: 'standalone',
|
|
poweredByHeader: false,
|
|
images: {
|
|
remotePatterns: [
|
|
{
|
|
protocol: 'https',
|
|
hostname: pbPublicHost,
|
|
pathname: '/api/files/**',
|
|
},
|
|
],
|
|
},
|
|
experimental: {
|
|
viewTransition: true,
|
|
},
|
|
};
|
|
|
|
export default nextConfig;
|