diff --git a/app/backend/app.py b/app/backend/app.py index 1ab1ff9a10..b9d904b476 100644 --- a/app/backend/app.py +++ b/app/backend/app.py @@ -102,7 +102,6 @@ @bp.route("/") async def index(): - # TODO: use msal loginRedirect on a blankish page return await bp.send_static_file("index.html") diff --git a/app/backend/prepdocs.py b/app/backend/prepdocs.py index 54ec6f0dd9..d62a42f8cf 100644 --- a/app/backend/prepdocs.py +++ b/app/backend/prepdocs.py @@ -241,8 +241,7 @@ async def main(strategy: Strategy, setup_index: bool = True): if __name__ == "__main__": parser = argparse.ArgumentParser( - description="Prepare documents by extracting content from PDFs, splitting content into sections, uploading to blob storage, and indexing in a search index.", - epilog="Example: prepdocs.py '.\\data\*' -v", + description="Prepare documents by extracting content from PDFs, splitting content into sections, uploading to blob storage, and indexing in a search index." ) parser.add_argument("files", nargs="?", help="Files to be processed") @@ -302,6 +301,10 @@ async def main(strategy: Strategy, setup_index: bool = True): load_azd_env() + if os.getenv("AZURE_PUBLIC_NETWORK_ACCESS") == "Disabled": + logger.error("AZURE_PUBLIC_NETWORK_ACCESS is set to Disabled. Exiting.") + exit(0) + use_int_vectorization = os.getenv("USE_FEATURE_INT_VECTORIZATION", "").lower() == "true" use_gptvision = os.getenv("USE_GPT4V", "").lower() == "true" use_acls = os.getenv("AZURE_ADLS_GEN2_STORAGE_ACCOUNT") is not None diff --git a/scripts/prepdocs.sh b/scripts/prepdocs.sh index b75a5efc96..c0254755e0 100755 --- a/scripts/prepdocs.sh +++ b/scripts/prepdocs.sh @@ -4,14 +4,6 @@ echo 'Running "prepdocs.py"' -AZURE_USE_AUTHENTICATION=$(azd env get-value AZURE_PUBLIC_NETWORK_ACCESS) -AZURE_PUBLIC_NETWORK_ACCESS=$(azd env get-value AZURE_PUBLIC_NETWORK_ACCESS) - -if [ -n "$AZURE_USE_AUTHENTICATION" ] && [ "$AZURE_PUBLIC_NETWORK_ACCESS" = "Disabled" ]; then - echo "AZURE_PUBLIC_NETWORK_ACCESS is set to Disabled. Exiting." - exit 0 -fi - additionalArgs="" if [ $# -gt 0 ]; then additionalArgs="$@"