quarchive icon indicating copy to clipboard operation
quarchive copied to clipboard

CORS preflighting bit wonky

Open calpaterson opened this issue 4 years ago • 1 comments

Description

The extensions HTTP requests to the sync api get preflighted. Those requests look a bit wonky (and aren't directly tested).

Steps to reproduce

  1. Cause a full or partial sync
  2. Observe the preflight request

Expected result

  1. Preflight request is responded to pretty fast (
  2. Preflight response includes the correct caching headers

Actual result

Considerable doubt regarding #1 and #2

Additional details

Fix for this should include a specific test that checks it works (and that no DB activity is done) and that the speciai CORS caching headers are returned.

calpaterson avatar Dec 08 '20 15:12 calpaterson

This probably requires splitting up the (remaining) main blueprint into one for the web ui and one for the sync api. Then get rid of Flask-CORS are write the OPTIONS endpoint by hand.

calpaterson avatar Dec 09 '20 15:12 calpaterson