feat: add API route for serving images with path validation

This commit is contained in:
Nils-Johan Gynther
2026-04-16 19:10:06 +02:00
parent 3f4fe890df
commit 1b9df4d20d
2 changed files with 39 additions and 0 deletions
+8
View File
@@ -1,6 +1,14 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'standalone',
async rewrites() {
return [
{
source: '/images/:filename',
destination: '/api/images/:filename',
},
];
},
};
module.exports = nextConfig;