You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
one gotcha with the suggested fix is that this is also called from sw.ts code, and image onload won't work there, so we won't be able to do redirects from sw anymore, which will result in a little more assets rendered than we need.. but we have the redirect already working in client side code so it shouldn't break anything.
Problem: brittle subdomain mode support detection
Right now we make request to
bafkqaaa
on subdomain viafetch
:https://github.com/ipfs-shipyard/service-worker-gateway/blob/289aca764da893789508c56d7f9e0caeb5711d90/src/lib/path-or-subdomain.ts#L35-L39
This is too brittle, because it will likely break once people start deployign their own instances without doing all the steps we did:
Solution: switch to img onload
We should have a static
/1x1.png
inpublic/
and request that asset specifically.This solves two problems:
onload
will succeed even without*
CORS (solves false-negative)The text was updated successfully, but these errors were encountered: