Files
kokken/next.config.mjs
Alex Polo e6a83da2ab Refactor API calls to use apiFetch for consistency and improved cookie handling
- Updated availability admin page to use apiFetch for fetching and modifying blocked dates.
- Enhanced menu generator page to ensure all expected arrays are initialized to avoid rendering issues.
- Added path to cookies in login and logout routes for better cookie management.
- Improved availability blocked API to log request headers and handle both date and id for deletion.
- Updated menu generator API to include tags in the response structure and ensure expected arrays are present.
- Enhanced middleware to handle authentication more robustly, including detailed logging and handling of various request types.
- Added Playwright test to verify that toggling availability does not log out the admin user.
- Created apiFetch utility to standardize API requests with credentials included.
2025-11-07 15:50:22 +01:00

37 lines
785 B
JavaScript

/** @type {import('next').NextConfig} */
const nextConfig = {
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'warme.dk',
},
{
// Allow DALL·E / OpenAI image blob storage used by the generator
protocol: 'https',
hostname: 'oaidalleapiprodscus.blob.core.windows.net',
},
],
},
typescript: {
// Only run TypeScript checks in development
ignoreBuildErrors: process.env.NODE_ENV === 'production',
},
async headers() {
return [
{
source: '/:path*',
headers: [
{
key: 'Cache-Control',
value: 'public, max-age=31536000, immutable',
},
],
},
]
},
optimizeFonts: true,
};
export default nextConfig;