File tree Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Original file line number Diff line number Diff line change 11import parseRange from 'range-parser'
22
33/**
4- * Attempt to locate the requested resource from a Fastly Object- Store,
5- * If the request is a GET or HEAD request and a resource was found in the Object- Store, this will return a `Response`.
6- * If request is not GET or HEAD, or no resource was found in the Object- Store, this will return `null`
7- * @param {string } store_name The name of the Fastly Object- Store to search within.
8- * @param {Request } request The request to attempt to match against a resource within the Object- Store.
4+ * Attempt to locate the requested resource from a Fastly KV Store,
5+ * If the request is a GET or HEAD request and a resource was found in the KV Store, this will return a `Response`.
6+ * If request is not GET or HEAD, or no resource was found in the KV Store, this will return `null`
7+ * @param {string } store_name The name of the Fastly KV Store to search within.
8+ * @param {Request } request The request to attempt to match against a resource within the KV Store.
99 * @returns {Promise<Response | null> } Returns a `Response` if a resource was found, else returns `null`.
1010 */
1111export async function get ( store_name , request ) {
Original file line number Diff line number Diff line change 33
44import { get } from "../c-at-e-file-server.js" ;
55import { env } from "fastly:env" ;
6- import { KVStore } from "fastly:kv-store" ;
7-
8- // Pending update to https://github.com/JakeChampion/compute-file-server/commit/58bdcd4a6234bba5b74502f5f03bcaffabc7ad02
9- globalThis . ObjectStore = KVStore ;
106
117addEventListener ( "fetch" , ( event ) => event . respondWith ( app ( event ) ) ) ;
128
@@ -24,4 +20,4 @@ async function app(event) {
2420 console . error ( error ) ;
2521 return new Response ( error . message + '\n' + error . stack , { status : 500 } )
2622 }
27- }
23+ }
You can’t perform that action at this time.
0 commit comments