Blocked by CORS policy

18 views
Skip to first unread message

Augusto Carmo

unread,
Apr 1, 2022, 8:28:29 PM4/1/22
to dev
Hello, sometime ago I developed a vue application view and batch edit tags from my annotations, and It worked fine, but now I'm being blocked by CORS police when I use the PATCH method.

This is my code:

const results = await apiPatchAnnotation('/annotations/' + id, { tags: tagsToAdd }, apiInfo.token)

There's something that I can do to fix it?

Thanks!

Robert Knight

unread,
Apr 2, 2022, 1:34:59 AM4/2/22
to Augusto Carmo, dev
Hello,

Can you provide a complete list of the request and response headers as reported in your browsers devtools for the PATCH request? One possible issue might be if the request includes a non-standard header which hasn't been explicitly allowed by our server. Additionally if you see an "OPTIONS" request from your browser (aka a "CORS preflight" request) can you include the request/response details for that as well?

Kind regards,
Robert.

--
You received this message because you are subscribed to the Google Groups "dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dev+uns...@list.hypothes.is.
To view this discussion on the web visit https://groups.google.com/a/list.hypothes.is/d/msgid/dev/c939c9bc-4511-4ebc-952e-d6e8cc7ae406n%40list.hypothes.is.

Augusto Carmo

unread,
Apr 2, 2022, 7:48:15 AM4/2/22
to dev, Robert Knight, dev, Augusto Carmo
That was strange, I tested again this morning in another tab and it worked correctly, without any changes. Luckily I had a tab where the problem continues so here is more information about the requests:

Reply all
Reply to author
Forward
0 new messages