2026-05-07 12:28:42 +03:00
|
|
|
import type { NextConfig } from 'next';
|
|
|
|
|
|
2026-05-21 18:15:16 +03:00
|
|
|
/* 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';
|
2026-04-18 14:52:39 +03:00
|
|
|
|
|
|
|
|
const nextConfig: NextConfig = {
|
2026-05-18 21:34:25 +03:00
|
|
|
output: 'standalone',
|
2026-05-18 21:40:10 +03:00
|
|
|
poweredByHeader: false,
|
2026-05-18 21:34:25 +03:00
|
|
|
images: {
|
|
|
|
|
remotePatterns: [
|
|
|
|
|
{
|
2026-05-21 18:01:03 +03:00
|
|
|
protocol: 'https',
|
2026-05-21 18:15:16 +03:00
|
|
|
hostname: pbPublicHost,
|
2026-05-18 21:40:10 +03:00
|
|
|
pathname: '/api/files/**',
|
2026-05-18 21:34:25 +03:00
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
2026-05-12 16:10:50 +03:00
|
|
|
experimental: {
|
|
|
|
|
viewTransition: true,
|
|
|
|
|
},
|
2026-05-07 12:28:42 +03:00
|
|
|
};
|
2026-04-18 14:52:39 +03:00
|
|
|
|
2026-05-07 12:28:42 +03:00
|
|
|
export default nextConfig;
|