sift: Static files not working when deployed
Static files are not served on Deno Deploy; images are corrupt locally and when deployed.
I’ve created a sample project to reproduce this issue: https://github.com/wezm/repro-sift-static
In Deno Deploy it’s linked to https://github.com/wezm/repro-sift-static/blob/main/src/index.ts, accessible at https://quiet-owl-61.deno.dev/.

When running locally with deployctl run --watch --libs=ns,fetchevent --addr :8888 src/index.ts
the style sheet loads properly (somtimes) but when deployed it does not. The image does not load locally or when deployed.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 20 (7 by maintainers)
Thanks for the patience, @wezm! I fixed the issue and released a new version
0.3.4
. Please try it out and let me know if you face any issues.There’s a tracking issue (https://github.com/denoland/deployctl/issues/60) on deployctl. But you’ll soon be able to run
sift
usingdeno
without the need fordeployctl
, which should fix the local static assets issue.@satyarohith The browser will reject a mutated headers object
Instead, build a fresh set of headers from the existing and the browser will accept them.
I learned this the hard way when I built my own static file server for Deploy … https://clock.deno.dev/ SEE: https://github.com/nhrones/DotClock