0

Access to XMLHttpRequest at 'https://www.site_a' from origin 'https://fb66da46a53d.ngrok.io' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: Redirect is not allowed for a preflight request.

$.ajax({ url: 'https://www.site_a', type: 'POST', headers: { 'Access-Control-Allow-Origin': 'https://fb66da46a53d.ngrok.io',

        },
        data: {
            produit: 'vente',
            geo_objets_ids: '8979',
            typesbien: 'appartement',
            typesbien: 'terrain',
            nb_pieces: 1,
            nb_pieces: 2,
            nb_pieces: 3,
            nb_chambres: '',
            surface: '',
            prix: '',
            action: 'submit'
        },
        success: function(response) {
            // window.location.href = response;
            console.log(response);
        }


    });
  • Does this answer your question? [Response to preflight request doesn't pass access control check](https://stackoverflow.com/questions/35588699/response-to-preflight-request-doesnt-pass-access-control-check) – Reyno Jan 18 '21 at 07:50
  • Question is almost same but not getting success . – Mohammad Siddiqie Jan 18 '21 at 08:04

0 Answers0