mnfst 0.5.108 → 0.5.109
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/manifest.data.js +31 -30
- package/lib/manifest.integrity.json +1 -1
- package/package.json +1 -1
package/lib/manifest.data.js
CHANGED
|
@@ -7605,44 +7605,45 @@ function createAppwriteMethodsHandler(dataSourceName, reloadDataSource) {
|
|
|
7605
7605
|
|
|
7606
7606
|
// Authenticate the fetch for permissioned buckets.
|
|
7607
7607
|
//
|
|
7608
|
-
// Storage's /view, /download and /preview endpoints
|
|
7609
|
-
//
|
|
7610
|
-
//
|
|
7611
|
-
//
|
|
7612
|
-
//
|
|
7613
|
-
//
|
|
7614
|
-
//
|
|
7615
|
-
// (SameSite=Lax blocks third-party cookies on plain HTTP).
|
|
7608
|
+
// Storage's /view, /download and /preview endpoints check
|
|
7609
|
+
// the USER SESSION — not API/dev keys (those work only on
|
|
7610
|
+
// JSON endpoints like /storage/buckets/.../files/.../).
|
|
7611
|
+
// In localhost dev the browser blocks the cross-domain
|
|
7612
|
+
// session cookie (SameSite=Lax on plain HTTP), so the
|
|
7613
|
+
// request lands at Appwrite as anonymous and a permissioned
|
|
7614
|
+
// file returns 404 storage_file_not_found.
|
|
7616
7615
|
//
|
|
7617
|
-
// Appwrite
|
|
7618
|
-
//
|
|
7619
|
-
//
|
|
7620
|
-
//
|
|
7621
|
-
//
|
|
7616
|
+
// The Appwrite Web SDK works around this by writing the
|
|
7617
|
+
// session token to localStorage under `cookieFallback`
|
|
7618
|
+
// and replaying it as the `X-Fallback-Cookies` header on
|
|
7619
|
+
// every SDK request. That's why SDK calls (getFile metadata
|
|
7620
|
+
// above, listRows, $create, etc.) succeed cross-domain
|
|
7621
|
+
// while raw fetch() doesn't — raw fetch doesn't know to
|
|
7622
|
+
// read that localStorage key.
|
|
7622
7623
|
//
|
|
7623
|
-
//
|
|
7624
|
-
//
|
|
7625
|
-
//
|
|
7626
|
-
// -
|
|
7627
|
-
//
|
|
7628
|
-
//
|
|
7624
|
+
// We do exactly what the SDK does: read cookieFallback
|
|
7625
|
+
// and attach it as X-Fallback-Cookies. This is more
|
|
7626
|
+
// reliable than JWT:
|
|
7627
|
+
// - no createJWT round-trip (and dev-key-configured
|
|
7628
|
+
// clients 501 on createJWT)
|
|
7629
|
+
// - no 15-min expiry or rate limit (10/hour/account)
|
|
7630
|
+
// - matches whatever auth the SDK is already using
|
|
7631
|
+
//
|
|
7632
|
+
// Falls through to credentials-only when the user isn't
|
|
7633
|
+
// signed in (no cookieFallback in storage) — that path
|
|
7634
|
+
// still works in production with a SameSite=None cookie.
|
|
7629
7635
|
const fetchHeaders = {};
|
|
7630
7636
|
if (appwriteConfig.projectId) {
|
|
7631
7637
|
fetchHeaders['X-Appwrite-Project'] = appwriteConfig.projectId;
|
|
7632
7638
|
}
|
|
7633
7639
|
try {
|
|
7634
|
-
const
|
|
7635
|
-
|
|
7636
|
-
|
|
7637
|
-
|
|
7638
|
-
|
|
7639
|
-
const jwtResult = await account.createJWT();
|
|
7640
|
-
if (jwtResult?.jwt) {
|
|
7641
|
-
fetchHeaders['X-Appwrite-JWT'] = jwtResult.jwt;
|
|
7642
|
-
}
|
|
7643
|
-
}
|
|
7640
|
+
const cookieFallback = typeof localStorage !== 'undefined'
|
|
7641
|
+
? localStorage.getItem('cookieFallback')
|
|
7642
|
+
: null;
|
|
7643
|
+
if (cookieFallback) {
|
|
7644
|
+
fetchHeaders['X-Fallback-Cookies'] = cookieFallback;
|
|
7644
7645
|
}
|
|
7645
|
-
} catch { /*
|
|
7646
|
+
} catch { /* localStorage access denied — fall through */ }
|
|
7646
7647
|
|
|
7647
7648
|
const response = await fetch(viewUrl, {
|
|
7648
7649
|
method: 'GET',
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"manifest.color.js": "sha384-Z9G/lzt0vVMxjz4wkPuGG1X9mmQAJR15aOoGX3ephf7r2wnlUWet5GLgkUMtT4vt",
|
|
7
7
|
"manifest.colorpicker.js": "sha384-0EVn+Ha06h7FIvOxc6WjZYnKYXzi+zba08yKvczSEGTRkWRxyKN2TFrZHI1SDCXu",
|
|
8
8
|
"manifest.components.js": "sha384-3dCTD5EwCZTiX+1obYtDNM3WWwPh2JDQUQQsdRUUK3gs6FXjse1ShkKaT/2jsNaI",
|
|
9
|
-
"manifest.data.js": "sha384-
|
|
9
|
+
"manifest.data.js": "sha384-pgX6RJRWP7jmWO4ALb+GbS7Gm5JGOrCtxjEOnEcj1aJ8HoGbFjOniyjsntf8IA+B",
|
|
10
10
|
"manifest.dropdowns.js": "sha384-WMrFoSpKfJuo81dyrwhVrDO8rq+rDwh2x8x4nH01BY5ZHkvjE+/SaT2gWCI0zOn+",
|
|
11
11
|
"manifest.export.js": "sha384-qvdGz1TiGEDOeWJ5os1z03RURdKX+ezZEQ1KyV+9iC7X0esLK83mtY87t4MQv45t",
|
|
12
12
|
"manifest.icons.js": "sha384-uOkboYrovjCpl22eey3Jaxpey+pOnot5NDnRRumcRxiR7IOVaRh1i20gYnWXR5dW",
|