Deleted Snippet content still injected into served index.html after fresh deployment
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 45/100
Hướng nghiên cứu
Start with the Microsoft.Web/staticSites/snippets Management API responses and the Azure Static Web Apps deployment flow using Azure/static-web-apps-deploy@v1 and Oryx. Compare the locally built clean index.html with the served response after a fresh deployment, and trace where snippet injection occurs. Done means a deleted snippet confirmed absent by the API is no longer injected into the deployed index.html.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
A Microsoft.Web/staticSites/snippets entry that has been deleted (confirmed via the Management API returning an empty value: [] list) continues to be injected into the served index.html, and survives a subsequent fresh deployment.
More surprisingly, the content still being injected does not match either of the (now-deleted) snippets we could account for — it appears to be an even older snippet version that neither of us could find a record of, suggesting the injection layer is reading from a cache/replica that is either very stale or not being invalidated correctly across edits, rather than a simple few-minutes propagation delay.
Steps to reproduce
- Add a Snippet via the portal (location: Head, insert at bottom) that injects a
<script>tag. - Deploy the app; confirm the snippet appears in the served HTML.
- Delete the snippet (portal or
DELETE .../staticSites/{name}/snippets/{name}?api-version=2022-03-01). - Confirm via
GET .../staticSites/{name}/snippets?api-version=2022-03-01that the snippets list is now empty. - Trigger a fresh deployment (new commit, new build, new artifact — confirmed via a locally-reproduced
ng buildproducing a cleanindex.htmlwith no trace of any snippet). - Request the site's
index.html— the old snippet's script is still present, injected in the same location/format as before.
Expected behavior
Once a snippet is deleted and confirmed absent from the Management API, a fresh deployment should serve index.html without any snippet injected.
Actual behavior
The served index.html still contains an injected <script> block at the expected snippet insertion point (end of <head>), even though:
- The snippets list API returns
[]for the site. - The locally-built artifact (same source, same build command run outside of Azure's pipeline) is confirmed byte-for-byte clean apart from this one injected block.
- ETag/Last-Modified on the served response update with each new deployment, confirming it isn't a simple HTTP/CDN cache.
- The injected content doesn't match the text of the last known snippets we had configured, suggesting it may be an older, previously-deleted snippet resurfacing rather than the most recently deleted one.
Environment
- Static Web Apps (Standard plan)
- Deployment via GitHub Actions using
Azure/static-web-apps-deploy@v1,Oryxbuild (Node 22, Angular app) - Snippets configured via the
Microsoft.Web/staticSites/snippetsARM resource,api-version=2022-03-01
Happy to provide more detail (redacted resource names/ids) if useful for investigation.
- Ngôn ngữ chính
- Không có dữ liệu ngôn ngữ
- Star
- 347
- Fork
- 68
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Azure/static-web-apps
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Azure/static-web-apps#1764 · 2 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
Azure/static-web-apps#1827 ·
-
Managed Functions Not RestartingĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
Azure/static-web-apps#1826 · 5 bình luận · 1 reaction ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
Azure/static-web-apps#1825 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 18/100
Azure/static-web-apps#1824 ·
Tất cả issue của Azure/static-web-apps
Issue tương tự
-
Language: Terraform :globe_with_meridians: Needs: Triage :mag: Type: Bug :bug:
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Azure/terraform-azurerm-avm-res-storage-storageaccount#450 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
A quote or backslash in private registry credentials renders invalid JSONCó thể đã có người làm @blacksoxx đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
kubescape/helm-charts#1057 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
aws-amplify/amplify-backend#3385 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
data-mermaid/mermaid-segmentation#377 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
mieweb/ozwell-computer#84 ·
Maintainer thường phản hồi trong vòng 1 ngày