i’m setting up a redwoodjs app that is supposed to interact with a flask api server running on port 5000.
i typically add a line to my package.json to proxy requests to a localhost:5000
to avoid CORS problems when developing locally
and that doesnt seem to work with Redwood.
any ideas? i played around with the redwood.toml and just managed to break graphql
my only problem was that i set it up like the above, and if i had a route like ‘/dropdowns’
i was getting requests to ‘/other-api/dropdowns’. so just being mindful of how that works broke it on through for me. cheers @danny!
As @danny mentioned, when deployed to Netlify, the api proxy redirect can handle that via “splats”
/api/* https://api.example.com/:splat 200
So in your case, a /api/dropdowns request can redirect to https://api.example.com/dropdowns and not https://api.example.com/api/dropdowns which I think is what you want (?).