Unstructured-IO / unstructured-api-tools

Apache License 2.0
28 stars 10 forks source link

chore: adding optional cors to pipeline api #172

Closed amanda103 closed 1 year ago

amanda103 commented 1 year ago

Testing steps!

example curl request: should see 200:

curl -X OPTIONS -H "Origin: http://example.com" -H "Access-Control-Request-Method: POST" -i http://localhost:8000/general/v0/general

should see 400 (bad cors origin)

curl -X OPTIONS -H "Origin: http://localhost:3000" -H "Access-Control-Request-Method: POST" -i http://localhost:8000/general/v0/general
awalker4 commented 1 year ago

(Although I just saw that Crag had the comment about test steps...)

amanda103 commented 1 year ago

(Although I just saw that Crag had the comment about test steps...)

Just added some testing steps @awalker4 let me know if you run into any weirdness!

awalker4 commented 1 year ago

Awesome, worked like a charm!