From 34d31a86db4eb3d0dc97043c88f2a4d0409de417 Mon Sep 17 00:00:00 2001 From: Darrel Pol Date: Fri, 22 Nov 2024 21:24:49 -0600 Subject: [PATCH 1/2] making that status endpoint public --- basic_auth_middleware.py | 5 +++++ 1 file changed, 5 insertions(+) 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 "): From 549fcb64e9d232ce019540c110219569311a62fe Mon Sep 17 00:00:00 2001 From: Darrel Pol Date: Fri, 22 Nov 2024 21:26:12 -0600 Subject: [PATCH 2/2] adding no cache. because why not --- .github/workflows/on_push_deploy_to_staging.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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