A
A
Anton Filippov2017-09-10 09:06:43
JavaScript
Anton Filippov, 2017-09-10 09:06:43

The server does not accept the PATCH request, what could be the reasons?

There is a server (black box), on which the API accepts POST / GET / DELETE, but on PATCH I catch this error:

Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin ' localhost:8081 ' is therefore not allowed access. The response had HTTP status code 403.

Origin is registered in the server. Through swagger and curl in the terminal everything is ok. Tried both jQuery and axios. PATCH is present in the response header. PATCH is not accepted on different urls.
What could be the reason?

Maybe the patch has some features? Or do you need to kick backenders and their server? (Indians) If the second, then what is the logic of the bug, if the request passes through the curl, but does not want to from browsers?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Pavlyut, 2017-09-11
@vicodin

Total your decision after debugging in our discussion:

endpoints.cors.allowed-methods=GET,POST,PUT,DELETE,OPTIONS

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question