Ich implementiere einen Web-Service mit CORS-Unterstützung. Alles funktioniert einwandfrei, außer wenn ich eine DELETE-Anfrage ausstelle. Firefox sendet folgende Preflight:Firefox ignoriert CORS-Methode
OPTIONS /node-configuration?sessionId=cee013ce-53e6-11e6-8929-7efd7b6db237&address=127.0.0.1&port=8043 HTTP/1.1
Host: 127.0.0.1:8032
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
Access-Control-Request-Method: DELETE
Origin: XXX
Connection: keep-alive
Und der Server antwortet mit:
HTTP/1.1 200 OK
Content-Length: 0
Strict-Transport-Security: max-age=31536000; includeSubDomains
Access-Control-Allow-Origin: XXX
Access-Control-Allow-Method: POST, GET, DELETE, OPTIONS
Wie Sie sehen können, DELETE ist in der Access-Control-Allow-Methode Header. Aber wenn ich senden die Anfrage:
DELETE /node-configuration?sessionId=cee013ce-53e6-11e6-8929-7efd7b6db237&address=127.0.0.1&port=8043
Accept: application/json, text/plain, */*
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.5
Connection: keep-alive
Host: 127.0.0.1:8032
Origin: XXX
Referer: XXX
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0
Firefox blockiert es: Methode nicht in CORS gefunden „Access-Control-Allow-Methoden“
Bin ich etwas fehlt?
Sie haben absolut Recht. Ich hasse diese Art von Tippfehlern :) – krojew