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
Copy file name to clipboardExpand all lines: src/ipfs-sw-first-hit.ts
+9-6Lines changed: 9 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,19 @@
1
1
/**
2
-
* This script is injected into the ipfs-sw-first-hit.html file. This was added when addressing an issue with redirects not preserving query parameters.
2
+
* This script is injected into the ipfs-sw-first-hit.html file. This was added
3
+
* when addressing an issue with redirects not preserving query parameters.
3
4
*
4
-
* The solution we're moving forward with is, instead of using 302 redirects with ipfs _redirects file, we are
5
-
* using 200 responses with the ipfs-sw-first-hit.html file. That file will include the ipfs-sw-first-hit.js script
6
-
* which will be injected into the index.html file, and handle the redirect logic for us.
5
+
* The solution we're moving forward with is, instead of using 302 redirects
6
+
* with ipfs _redirects file, we are using 200 responses with the
7
+
* ipfs-sw-first-hit.html file. That file will include the ipfs-sw-first-hit.js
8
+
* script which will be injected into the index.html file, and handle the
9
+
* redirect logic for us.
7
10
*
8
11
* It handles the logic for the first hit to the service worker and should only
9
12
* ever run when _redirects file redirects to ipfs-sw-first-hit.html for /ipns
10
13
* or /ipfs paths when the service worker is not yet intercepting requests.
11
14
*
12
-
* Sometimes, redirect solutions do not support redirecting directly to this page, in which case it should be handled
13
-
* by index.tsx instead.
15
+
* Sometimes, redirect solutions do not support redirecting directly to this
16
+
* page, in which case it should be handled by index.tsx instead.
log?.trace('no need to check for subdomain support',isPathGatewayRequest(location),isSubdomainGatewayRequest(location))
39
+
log?.trace('no need to check for subdomain support - is path gateway request %s, is subdomain gateway request %s',isPathGatewayRequest(location),isSubdomainGatewayRequest(location))
0 commit comments