Improve subdomain detection logic #249
Labels
effort/hours
Estimated to take one or several hours
enhancement
New feature or request
exp/intermediate
Prior experience is likely helpful
kind/architecture
Core architecture of project
kind/enhancement
A net-new feature or improvement to an existing feature
P1
High: Likely tackled by core team if no one steps up
status/ready
Ready to be worked
Milestone
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: