Title: ServiceWorker doesn't update `index.html` when headers (e.g. CSP) change · Issue #37390 · angular/angular · GitHub
Open Graph Title: ServiceWorker doesn't update `index.html` when headers (e.g. CSP) change · Issue #37390 · angular/angular
X Title: ServiceWorker doesn't update `index.html` when headers (e.g. CSP) change · Issue #37390 · angular/angular
Description: 🐞 bug report Affected Package The issue is caused by package @angular/service-worker:9.1.7 Is this a regression? Nope, seems to always been there Description Supposition: It seems that the service worker use body response only to generat...
Open Graph Description: 🐞 bug report Affected Package The issue is caused by package @angular/service-worker:9.1.7 Is this a regression? Nope, seems to always been there Description Supposition: It seems that the service ...
X Description: 🐞 bug report Affected Package The issue is caused by package @angular/service-worker:9.1.7 Is this a regression? Nope, seems to always been there Description Supposition: It seems that the service ...
Opengraph URL: https://github.com/angular/angular/issues/37390
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ServiceWorker doesn't update `index.html` when headers (e.g. CSP) change","articleBody":"\u003c!--🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅\r\n\r\nOh hi there! 😄\r\n\r\nTo expedite issue processing please search open and closed issues before submitting a new one.\r\nExisting issues often contain information about workarounds, resolution, or progress updates.\r\n\r\n🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅-->\r\n\r\n\r\n# 🐞 bug report\r\n\r\n### Affected Package\r\n\r\nThe issue is caused by package @angular/service-worker:9.1.7\r\n\r\n### Is this a regression?\r\n\r\nNope, seems to always been there\r\n\r\n\r\n### Description\r\n\r\nSupposition: It seems that the service worker use body response only to generate its hash, corresponding to versioned resources ; update some headers server side doesn't update these hashes and resources are served with old headers.\r\n\r\n\r\n## 🔬 Minimal Reproduction\r\n\r\nWhen deploying Angular application with service-worker (default configuration):\r\n- Load the main page in a browser\r\n- Service worker do its job and cache resources (including index.html)\r\n- Change global resources header (in my case, nginx configuration, like `add_header X-OneThing \"hello there\"`\r\n- Let the service worker try to do a cache bust\r\n- **Take a look on the answer : no update detected**\r\n- Refresh the page : **the new header isn't applied** (but the ngsw.json HTTP call got it, of course)\r\n\r\nSorry but cannot do a stackblitz with that :/\r\n\r\n\r\n## 🔥 Exception or Error\r\n\r\nNone\r\n\r\n\r\n## 🌍 Your Environment\r\n\r\n**Angular Version:**\r\n\u003cpre>\u003ccode>\r\n> ng \"version\"\r\n\r\n\r\n _ _ ____ _ ___\r\n / \\ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|\r\n / △ \\ | '_ \\ / _` | | | | |/ _` | '__| | | | | | |\r\n / ___ \\| | | | (_| | |_| | | (_| | | | |___| |___ | |\r\n /_/ \\_\\_| |_|\\__, |\\__,_|_|\\__,_|_| \\____|_____|___|\r\n |___/\r\n \r\n\r\nAngular CLI: 9.1.6\r\nNode: 12.14.1\r\nOS: linux x64\r\n\r\nAngular: 9.1.7\r\n... animations, common, compiler, compiler-cli, core, forms\r\n... language-service, platform-browser, platform-browser-dynamic\r\n... router\r\nIvy Workspace: Yes\r\n\r\nPackage Version\r\n-----------------------------------------------------------\r\n@angular-devkit/architect 0.901.6\r\n@angular-devkit/build-angular 0.901.6\r\n@angular-devkit/build-optimizer 0.901.6\r\n@angular-devkit/build-webpack 0.901.6\r\n@angular-devkit/core 9.1.6\r\n@angular-devkit/schematics 9.1.6\r\n@angular/cli 9.1.6\r\n@angular/platform-server 9.1.9\r\n@angular/service-worker 9.1.9\r\n@ngtools/webpack 9.1.6\r\n@schematics/angular 9.1.6\r\n@schematics/update 0.901.6\r\nrxjs 6.5.5\r\ntypescript 3.8.3\r\nwebpack 4.42.0\r\n\u003c/code>\u003c/pre>\r\n","author":{"url":"https://github.com/wibimaster","@type":"Person","name":"wibimaster"},"datePublished":"2020-06-02T12:06:24Z","url":"https://github.com/angular/angular/issues/37390"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:cee91623-2a49-6650-a5c5-883633b60c27 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9068:2AAD2E:E32DED:130335D:6B01085C |
| html-safe-nonce | e292628af4c72ed2e269c971cd7d8a401f7993804ae6c3b49ffae77fd1fa7feb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MDY4OjJBQUQyRTpFMzJERUQ6MTMwMzM1RDo2QjAxMDg1QyIsInZpc2l0b3JfaWQiOiI2NjI3MTE4NDIwNTEwOTY3OTAwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 51e8495e3548fe9b99c1f701b60b5493e15602092c236c365f65cc493e31e854 |
| hovercard-subject-tag | issue:629149584 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular/37390/issue_layout |
| twitter:image | https://opengraph.githubassets.com/60c21a24eb7748460b1258f8468918deb2c3dc81adb5ef7f3c82f9b698e7f54d/angular/angular/issues/37390 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/60c21a24eb7748460b1258f8468918deb2c3dc81adb5ef7f3c82f9b698e7f54d/angular/angular/issues/37390 |
| og:image:alt | 🐞 bug report Affected Package The issue is caused by package @angular/service-worker:9.1.7 Is this a regression? Nope, seems to always been there Description Supposition: It seems that the service ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | wibimaster |
| hostname | github.com |
| expected-hostname | github.com |
| None | cb7fa109eca7d4156c889f474306b0e91336055e9adf8fd4684b61e49094d124 |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular git https://github.com/angular/angular.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 24195339 |
| octolytics-dimension-repository_nwo | angular/angular |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24195339 |
| octolytics-dimension-repository_network_root_nwo | angular/angular |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2b59d31a4e44f08b7af67a4b67f8fd0af3befe2a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width