Issue 301 instead of 302 in case of relative imports
abhishiv opened this issue · 0 comments
abhishiv commented
Hey @mjackson
Thank you for this amazing project.
I just wanted to ask you why you issue 302 instead of 301 when issuing redirects in case of relative imports?
I.E. https://unpkg.com/rocky7@0.1.88/dist/esm/dom
That cause cloudflare to skip caching it, and cause a long waterfall when loading unpkg as ESM source.
If you were to issue 301, cloudflare would cache and that would even result in 0 requests hitting your server again. That would also make loading of esm libraries much faster and make the web faster!
I would be happy to make a PR if you would be interested in it!