diff --git a/.github/workflows/on_push_deploy_to_staging.yaml b/.github/workflows/on_push_deploy_to_staging.yaml index 876b5cab1..20496f2d9 100644 --- a/.github/workflows/on_push_deploy_to_staging.yaml +++ b/.github/workflows/on_push_deploy_to_staging.yaml @@ -42,7 +42,7 @@ jobs: - name: Build and tag Docker image run: | # Build the Docker image - docker build -t ${{ secrets.STAGING_ECR_URI }}:$IMAGE_TAG . + docker build --no-cache -t ${{ secrets.STAGING_ECR_URI }}:$IMAGE_TAG . # Tag the image as 'latest' docker tag ${{ secrets.STAGING_ECR_URI }}:$IMAGE_TAG ${{ secrets.STAGING_ECR_URI }}:latest diff --git a/basic_auth_middleware.py b/basic_auth_middleware.py index 505f0edee..d7d570ef2 100644 --- a/basic_auth_middleware.py +++ b/basic_auth_middleware.py @@ -12,6 +12,11 @@ class BasicAuthMiddleware(BaseHTTPMiddleware): self.password = password async def dispatch(self, request, call_next): + + # Allow unauthenticated access to the `/sdapi/v1/status` endpoint + if request.url.path == "/sdapi/v1/status": + return await call_next(request) + # Extract the Authorization header auth_header = request.headers.get("Authorization") or request.headers.get("authorization") if not auth_header or not auth_header.startswith("Basic "):