@joseph_dillon_522 wrote:
I'm in the process of refactoring an Express.js API and its REST endpoints.
We are switching from
app.get('creditCards',...)
toapp.get('/billing/cards',...)
. To make the transition easier, I want to simply add ares.redirect('/billing/cards')
inside thecreditCards
endpoint.On the client though, I get this error:
XMLHttpRequest cannot load http://localhost:3000/creditCards. The request was redirected to 'http://localhost:3000/billing/card', which is disallowed for cross-origin requests that require preflight.
How do I configure my CORS settings either on the API or on the client to allow this?
Posts: 1
Participants: 1