Cors Issue on My Next JS APP

Hi, @mark-baumann!

CORS issues are interesting. I wonder if we can align the project more to be like the Next.js Flask Starter template. Could be a start :bulb:

Otherwise, you could try looking at your proxy set-up to forward all /api requests from the frontend to the Flask backend. Instead of using the full URL, we’re now using a relative path /api/python.

On the front-end, you could rewrite the rule that forwards all requests from /api/* to your Flask backend. In development, it points to your local Flask server, and in production, it points to your deployed Flask app on Vercel.

For the back-end, maybe you can configure your Flask app to use port 5328 to match the starter template.

Could you give that a go and let us know how you get on?