Skip to content

Conversation

michelroegl-brunner
Copy link
Member

Summary

This PR resolves several Next.js warnings and fixes SVG path errors in the application.

Changes Made

🔧 Next.js Viewport Warning Fix

  • File: src/app/layout.tsx
  • Issue: Unsupported metadata viewport configuration warning
  • Fix: Moved viewport configuration from metadata export to separate viewport export (Next.js 14+ compliance)

🎨 SVG Path Error Fix

  • File: src/app/_components/CategorySidebar.tsx
  • Issue: Malformed SVG arc command causing React DOM error
  • Fix: Corrected arc command from A6 6 0 1721 9z to A6 6 0 1 0 21 9z (added missing arc flags)

🌐 Cross-Origin Request Warning Fix

  • File: next.config.js
  • Issue: Cross-origin request warning from local network devices
  • Fix: Added allowedDevOrigins configuration supporting all private network ranges:
    • Localhost and loopback addresses
    • Class A private networks (10.x.x.x)
    • Class B private networks (172.16.x.x - 172.31.x.x)
    • Class C private networks (192.168.x.x)

Benefits

  • ✅ Eliminates Next.js console warnings
  • ✅ Fixes SVG rendering errors
  • ✅ Enables access from any local network device without hardcoding IPs
  • ✅ Maintains security by only allowing private network ranges
  • ✅ Future-proof configuration that works with any user's network setup

Testing

  • Verified viewport metadata warning is resolved
  • Confirmed SVG path renders correctly without console errors
  • Tested cross-origin access from local network devices

- Remove viewport from metadata export in layout.tsx
- Add separate viewport export following Next.js 14+ conventions
- Fixes unsupported metadata viewport warning
- Move viewport metadata to separate export in layout.tsx (Next.js 14+ compliance)
- Fix malformed SVG arc command in CategorySidebar.tsx key icon
- Add allowedDevOrigins configuration for cross-origin requests from local networks
- Support all private network ranges without hardcoding specific IPs
@michelroegl-brunner michelroegl-brunner requested a review from a team as a code owner October 10, 2025 09:52
@michelroegl-brunner michelroegl-brunner merged commit 608a7ac into main Oct 10, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant