Skip to content

Instantly share code, notes, and snippets.

@vyspiansky
Created November 14, 2022 09:27
Show Gist options
  • Save vyspiansky/ce7cacaf3b8dabf4472c9f4b046e6b68 to your computer and use it in GitHub Desktop.
Save vyspiansky/ce7cacaf3b8dabf4472c9f4b046e6b68 to your computer and use it in GitHub Desktop.
Bash: check preflight request
curl -v -i -X OPTIONS -H "Origin: <WEBSIDE_URL>" \
-H 'Access-Control-Request-Method: POST' \
-H 'Access-Control-Request-Headers: Accept, Content-Type, Origin, Referer, User-Agent, X-YOUR-CUSTOM-HEADER' \
"<XHR_URL>"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment