D
D
dpablo_escobarr2021-04-03 22:13:49
Express.js
dpablo_escobarr, 2021-04-03 22:13:49

The server issues a response, but cannot display the result on the console. What could it be?

When included in the Fetch method for a POST request, mod - no-cors, the server issues a response, but cannot display the result passed to it from the client. The headers on the server are:

'Access-Control-Allow-Origin': 'http://127.0.0.1',
        'Access-Control-Allow-Credentials': 'true',
        'Accept': 'application/json; charset=utf-8',
        'Access-Control-Allow-Methods': 'POST, OPTIONS, GET',
        'Access-Control-Allow-Headers': 'POST, OPTIONS, GET',
        'Content-Type': 'application/json',


On the client:

'Allow': 'application/json',
        'Content-Type': 'application/json;charset=utf-8',


Without specifying mode: 'no-cors', everything works for chrome with CORS disabled, with a flag specified inside the desktop shortcut. In Yandex Browser, working with the settings out of the box, only the response code is 200, and the pre-flight request has not been completed.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question