Files

27 lines
756 B
TypeScript
Raw Permalink Normal View History

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',
2026-05-18 21:40:10 +03:00
poweredByHeader: false,
images: {
remotePatterns: [
{
2026-05-21 18:01:03 +03:00
protocol: 'https',
hostname: pbPublicHost,
2026-05-18 21:40:10 +03:00
pathname: '/api/files/**',
},
],
},
experimental: {
viewTransition: true,
},
};
export default nextConfig;