feat: Update frontend and backend configurations for development environment - Downgrade PyP100 version in requirements.txt for compatibility. - Add new frontend routes for index, login, dashboard, printers, jobs, and profile pages. - Modify docker-compose files for development setup, including environment variables and service names. - Update Caddyfile for local development with Raspberry Pi backend. - Adjust health check route to use updated backend URL. - Enhance setup-backend-url.sh for development environment configuration. """
52 lines
1.0 KiB
JavaScript
52 lines
1.0 KiB
JavaScript
/** @type {import('next').NextConfig} */
|
|
const nextConfig = {
|
|
// Entwicklungsumgebung - weniger restriktive CORS
|
|
async headers() {
|
|
return [
|
|
{
|
|
source: "/:path*",
|
|
headers: [
|
|
{
|
|
key: "Access-Control-Allow-Origin",
|
|
value: "*",
|
|
},
|
|
{
|
|
key: "Access-Control-Allow-Methods",
|
|
value: "GET, POST, PUT, DELETE, OPTIONS",
|
|
},
|
|
{
|
|
key: "Access-Control-Allow-Headers",
|
|
value: "Content-Type, Authorization",
|
|
},
|
|
],
|
|
},
|
|
];
|
|
},
|
|
// Rewrites für Backend-API-Aufrufe zum Raspberry Pi
|
|
async rewrites() {
|
|
return [
|
|
{
|
|
source: '/api/backend/:path*',
|
|
destination: 'http://192.168.0.105:5000/api/:path*',
|
|
},
|
|
// Direkter Proxy für Health-Checks
|
|
{
|
|
source: '/backend-health',
|
|
destination: 'http://192.168.0.105:5000/health',
|
|
},
|
|
];
|
|
},
|
|
// Entwicklungseinstellungen
|
|
experimental: {
|
|
serverComponentsExternalPackages: [],
|
|
},
|
|
// Logging für Entwicklung
|
|
logging: {
|
|
fetches: {
|
|
fullUrl: true,
|
|
},
|
|
},
|
|
};
|
|
|
|
export default nextConfig;
|