Files
Tanken/next.config.ts
Felitendo cfe4223657 feat(app): tab URLs, inline search-here, zoom marker fix, design polish
- Sync each tab with its own URL (/, /history, /stats, /settings) via
  pushState/popstate; rewrites + service-worker navigation fallback let
  deep links and reloads resolve to the app shell.
- Move the "Hier suchen" button inline to the right of the search bar
  (shrinks the box when shown); scan-picker hides the box and centres.
- Fix markers vanishing on zoom: re-render cached stations immediately
  when returning to display zoom, and keep markers on transient empty
  fetches when the centre barely moved.
- Soften tab and card entrance animations; scale-based pop-in for the
  now-inline search-here pill.
2026-06-15 12:47:05 +02:00

38 lines
1.2 KiB
TypeScript

import type { NextConfig } from 'next';
const securityHeaders = [
{ key: 'X-DNS-Prefetch-Control', value: 'on' },
{ key: 'X-Frame-Options', value: 'SAMEORIGIN' },
{ key: 'X-Content-Type-Options', value: 'nosniff' },
{ key: 'Referrer-Policy', value: 'strict-origin-when-cross-origin' },
{ key: 'Permissions-Policy', value: 'camera=(), microphone=(), geolocation=(self)' },
];
const nextConfig: NextConfig = {
output: 'standalone',
reactStrictMode: true,
async rewrites() {
// The four tabs live on a single client-rendered shell ("/"). These
// rewrites let deep links / reloads on /map, /history, /stats and
// /settings serve that same shell while keeping the visible URL — the
// client then opens the matching tab. Only the exact tab paths are
// listed, so /api/* and /admin are untouched.
return [
{ source: '/map', destination: '/' },
{ source: '/history', destination: '/' },
{ source: '/stats', destination: '/' },
{ source: '/settings', destination: '/' },
];
},
async headers() {
return [
{
source: '/(.*)',
headers: securityHeaders,
},
];
},
};
export default nextConfig;