Unstructured-IO / unstructured-api-tools

Apache License 2.0
28 stars 10 forks source link

chore: updating env var processing for CORS #174

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

curl -X OPTIONS -H "Origin: http://amanda.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