#CORS error

13 messages · Page 1 of 1 (latest)

fading pilot
#

When i send a request from client-side to a non-existing endpoint, i get two CORS errors , one with status code 404, and one with status null. How can I configure this to avoid CORS errors and simply get a general 404? Server-side is javax rs, and it seems to have headers in configuration

zinc krakenBOT
#

This post has been reserved for your question.

Hey @fading pilot! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

eager harness
#

make sure the server sends appropriate CORS headers, also on the 404 page

#

you can check the headers with curl -i or similar

fading pilot
#

hmm

#

what are 'appropriate' cors headers?

eager harness
#

depends on the use-case

fading pilot
#

im trying to implement a general solution for error handling. So theres is an endpoint /endpointx, but i send a request to /endpointy which doesnt exist and get cors error

#

im not use what kind of use-case this is

eager harness
#

which domains should have access?

#

And where should they have access?

fading pilot
#

okay i see it is not just 'add a line to a configuration' fix, so im closing this, i cant even answer your questions 😄