The pre-flight OPTIONS request returns 404 which prevents the browser (Chrome at least) from even trying the GET/POST. There are ways to get around the browser sending OPTIONS but that should not be a concern if a valid response is sent.
This change simply responds to the OPTIONS request letting the browser know it can perform GET and POST method requests, CORS, and send some useful headers.
Added additional pull request to make GET and POST parameter handling more consistent. Also adds the line that failed to parse which helps with debugging bogus packets.
The pre-flight OPTIONS request returns 404 which prevents the browser (Chrome at least) from even trying the GET/POST. There are ways to get around the browser sending OPTIONS but that should not be a concern if a valid response is sent.
This change simply responds to the OPTIONS request letting the browser know it can perform GET and POST method requests, CORS, and send some useful headers.