0

This question already has an answer here:

I know this question asked many times (e.g. OpenLayers 3: Cross-Origin Request Blocked: The Same Origin Policy disallows and Enabling CORS in geoserver 2.8.2 or how to use JSONP in geoserver?) but those all are not solving my issue.

I am working on WFS_T .Below is my code

    var transactWFS_polygon = function (p, f) {
    switch (p) {
        case 'insert':
            node = formatWFS.writeTransaction([f], null, null, formatGML_polygon);
            break;
        case 'update':
            node = formatWFS.writeTransaction(null, [f], null, formatGML_polygon);
            break;
        case 'delete':
            node = formatWFS.writeTransaction(null, null, [f], formatGML_polygon);
            break;
    }
    s = new XMLSerializer();
    str = s.serializeToString(node);
    alert(str);
    $.ajax('http://xxx:8076/geoserver/xxxx/ows', {
        type: 'POST',
        dataType: 'xml',
        processData: false,
        contentType: 'text/xml',
        data: str
    }).done();
}

I am getting 403 forbidden error in Options.How to enable option in geoserver which is running in localhost.

marked as duplicate by Ian Turton Jul 30 '17 at 16:30

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Where has this question been asked many times? Can you include a link or two as a head start for any potential answerers interested in helping? Have you reviewed these posts? – PolyGeo Mar 7 '17 at 10:49
  • i amalso facing same issue sir – user28536 Jul 19 '17 at 9:14
  • $.ajax('localhost:9999/geoserver/mywork/wfs/ows', { service: 'WFS', type: 'POST', dataType: 'xml', processData: true, contentType: 'text/xml', data: {data:payload} }).done(function() { alert("gekki hi "); console.log("indside done"); sourceWFS.clear(); }); – user28536 Jul 19 '17 at 9:17
  • My ajax is having problem, i guess with url . ajax success message is not working – user28536 Jul 19 '17 at 9:19
  • for its working by changing configuration in geoserver – veena hosur Oct 21 '17 at 7:43