Sharing here for visibility.
Hello @paulyoung, thanks for bringing this up.
Are you using icfront with an updated version of the service worker from the master branch of ic repo?
@nathan.mcgrath yes, I am.
Thanks for confirming @paulyoung!
I’m sorry to say that you’ve uncovered a bug that only exists on the master branch, it’s currently not released to mainnet yet. Until I find a fix for this bug, I’d recommend rolling back to the 1.2.7 release and this should fix your issue: ic/typescript/service-worker at service-worker_v1.2.7 · dfinity/ic · GitHub
Thanks again for bringing this to our attention.
Looks like it was introduced here: do not modify responses from outside ic · dfinity/ic@b4e811d · GitHub
My fix is working; do you have any security concerns or do you think it’s safe for me to keep in place?
Yes, that’s exactly where the bug was introduced.
With your fix the service worker would not match the HTTP Gateway Protocol specification: The Internet Computer Interface Specification | Internet Computer Home
If we can fix this without changing the HTTP Gateway Protocol specification then that would be preferred, otherwise we would need to update the spec and update any other components that implement that spec.