azure-sdk-tools/tools/openapihub-redirect
Ben Broderick Phillips 98807fbb69
openapi hub redirect app (#6375)
2023-06-21 21:43:08 -04:00
..
README.md openapi hub redirect app (#6375) 2023-06-21 21:43:08 -04:00
app.py openapi hub redirect app (#6375) 2023-06-21 21:43:08 -04:00
index.html openapi hub redirect app (#6375) 2023-06-21 21:43:08 -04:00

README.md

This is a simple web app to redirect users to either openapihub if they are on corp net, or openapi hub access docs if they are off corp net. This site is configured to load from https://portal.azure-devex-tools.com via the app service domain config and the azure-devex-tools DNS zone.

To update this app:

  1. Update app.py and/or index.html
  2. Enable basic authentication under General Settings here
  3. Run the following commands from this directory:
az login
az account set -s 'OpenAPI Platform - Preview'

# Install dependencies and archive app contents
pip install flask
pwsh -c Compress-Archive -path '*' -DestinationPath app.zip

# Deploy zip file to azure app service
az webapp deploy --resource-group openapi-platform-preview --name hub-redirect-app --src-path app.zip --type zip