diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f8a86890..ee075690 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,7 +52,7 @@ jobs: name: Tested Docker images uses: ./.github/workflows/docker.yml with: - push_digests: ${{ github.event_name == 'push' && github.ref == 'refs/heads/dev' }} + push_digests: false secrets: inherit required: diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 42b4db3e..2419bb7f 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -49,6 +49,8 @@ jobs: uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6 with: version: "0.11.3" + enable-cache: true + cache-dependency-glob: uv.lock - name: Resolve Docker through abxpkg env: diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index bd73bc46..d82c3632 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -26,6 +26,8 @@ jobs: - uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6 with: version: "0.11.3" + enable-cache: true + cache-dependency-glob: uv.lock - name: Install ArchiveBox development dependencies run: uv sync --locked --dev - name: Resolve documentation tools through abxpkg @@ -79,6 +81,8 @@ jobs: if: ${{ !contains(fromJSON('["freebsd", "openbsd"]'), matrix.environment) }} with: version: "0.11.3" + enable-cache: true + cache-dependency-glob: uv.lock - name: Install ArchiveBox if: ${{ !contains(fromJSON('["freebsd", "openbsd"]'), matrix.environment) }} run: uv sync --locked --dev diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 4b650286..01677449 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -25,7 +25,8 @@ jobs: uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6 with: version: "0.11.3" - enable-cache: false + enable-cache: true + cache-dependency-glob: uv.lock - name: Verify checked dependency lock run: uv lock --check diff --git a/.github/workflows/pip.yml b/.github/workflows/pip.yml index 5ae4cad1..7dee3016 100755 --- a/.github/workflows/pip.yml +++ b/.github/workflows/pip.yml @@ -23,7 +23,8 @@ jobs: uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6 with: version: ${{ env.UV_VERSION }} - enable-cache: false + enable-cache: true + cache-dependency-glob: uv.lock - name: Build every distribution run: | @@ -86,7 +87,8 @@ jobs: uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6 with: version: ${{ env.UV_VERSION }} - enable-cache: false + enable-cache: true + cache-dependency-glob: uv.lock - name: Download distributions uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 diff --git a/.github/workflows/test-parallel.yml b/.github/workflows/test-parallel.yml index 7ad9b4cc..abb27f7a 100644 --- a/.github/workflows/test-parallel.yml +++ b/.github/workflows/test-parallel.yml @@ -30,7 +30,8 @@ jobs: - uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6 with: version: "0.11.3" - enable-cache: false + enable-cache: true + cache-dependency-glob: uv.lock - name: Resolve discovery tools through abxpkg env: @@ -95,6 +96,8 @@ jobs: - uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6 with: version: "0.11.3" + enable-cache: true + cache-dependency-glob: uv.lock - name: Resolve optional build dependencies through abxpkg if: matrix.test.extra != '' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 859c0194..1ee7ee5e 100755 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -46,6 +46,8 @@ jobs: uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7 with: version: "0.11.3" + enable-cache: true + cache-dependency-glob: uv.lock - name: Prepare abxpkg environment env: @@ -195,6 +197,8 @@ jobs: uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6 with: version: "0.11.3" + enable-cache: true + cache-dependency-glob: uv.lock - name: Resolve Docker and curl through abxpkg env: diff --git a/archivebox/core/middleware.py b/archivebox/core/middleware.py index 8541a04f..68d97394 100644 --- a/archivebox/core/middleware.py +++ b/archivebox/core/middleware.py @@ -174,8 +174,10 @@ def ServerSecurityModeMiddleware(get_response): if base_config.SERVER_SECURITY_MODE == "auto" and request.method.upper() not in allowed_methods: request_host, _request_port = split_host_port((request.get_host() or "").lower()) base_host, _base_port = split_host_port(get_base_host(config=base_config)) + admin_host, _admin_port = split_host_port(get_admin_host(config=base_config)) api_host, _api_port = split_host_port(get_api_host(config=base_config)) - control_hosts = {host for host in (base_host, api_host) if host} + web_host, _web_port = split_host_port(get_web_host(config=base_config)) + control_hosts = {host for host in (base_host, admin_host, api_host, web_host) if host} if control_hosts and request_host not in control_hosts: return HttpResponseForbidden("ArchiveBox is running with the control plane disabled on this host.")