janelia-flyem / dvid

Distributed, Versioned, Image-oriented Dataservice
http://dvid.io
Other
197 stars 33 forks source link

Handle the OPTIONS method properly from http requests #324

Closed tingzhao closed 4 years ago

tingzhao commented 5 years ago

Sending POST/PUT/DELETE to DVID from a different website such as neuroglancer may trigger a preflight request, which sends an OPTIONS request to DVID to check if the actual method is available. It appears that DVID will return an error for any OPTIONS request, keeping neuroglancer from writing data to DVID.

DocSavage commented 5 years ago

There already is an automatic options middleware as well as CORS handling where "Access-Control-Allow-Origin" is "*". Is this not an OPTIONS issue but something else?

DocSavage commented 5 years ago

Possible issue: https://stackoverflow.com/questions/39286997/google-chrome-a-wildcard-cannot-be-used-in-the-access-control-allow-origin

DocSavage commented 4 years ago

Options handling was already being handled. Handling of CORS was finished as of commit 766cd10f, which permits neuroglancer support.