github f4exb/sdrangel v4.0.5
Web API: handle pre-flight requests

latest releases: v7.20.0, v7.19.1, v7.19.0...
5 years ago

Web API: handle pre-flight requests

When interacting with an API some browsers if not any send a so called "pre-flight request" before attempting to send the actual request. This is normally not done for GET requests that are essentially read-only but with the PUT, POST, DELETE. This pre-flight request uses the OPTIONS method and if it is not handled by the server that should respond with the list of methods allowed (or any method) the actual request will fail. So this fix implements a response to OPTIONS requests allowing any method from any client. This makes the API actually usable for browser based web applications.

Don't miss a new sdrangel release

NewReleases is sending notifications on new releases.