activate pyenv for unstructured-api (not -tools) and cd to root dir of unstructured-api-tools to run pip install -e . to install the current branch. (should see version.py ( 0.10.5 ) from this branch match output from pip list)
in the unstructured-api dir, run make generate-api
export ALLOWED_ORIGINS="http://example.com/,http://amanda.com" (important that the env var is a comma separated str) and start the app locally with make run-web-app
run curl and POST and OPTION requests to show the Access-Control-Allow-Origin header being set
Testing steps!
unstructured-api
(not-tools
) and cd to root dir ofunstructured-api-tools
to runpip install -e .
to install the current branch. (should see version.py ( 0.10.5 ) from this branch match output from pip list)unstructured-api
dir, run make generate-apiexample curl request: should see 200:
should see 400 (bad cors origin)