mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2026-01-30 20:33:06 -08:00
Merge pull request #44 from Moonlite-Media/making-status-endpoint-public
This commit is contained in:
commit
074c15f356
2 changed files with 6 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 "):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue