Please sign in to comment.
Add empty OPTIONS route for presign_endpoint
Newer Uppy versions make an additional OPTIONS request before the GET presign request. This is not a CORS preflight request (those are made automatically by the browser for non-idempotent verbs like POST, PUT, and DELETE), it's an explicit request that Uppy client seems to make for every route now. The intention is to fetch additional information from the Uppy Companion app. Since our presign endpoint is not actually Uppy Companion, we just return an empty response, which seems to be fine for Uppy. The fact that this route was missing wasn't causing any actual problems, as Uppy would still continue the upload regardless of whether the OPTIONS request succeeded. This change is just so that developers don't see a failed request in browser's network inspector. Fixes #436
- Loading branch information
Showing with 29 additions and 7 deletions.