mirror of
https://github.com/arfct/itty-bitty.git
synced 2026-03-11 08:54:33 +00:00
11 lines
337 B
JavaScript
11 lines
337 B
JavaScript
export default async (request, context) => {
|
|
let url = new URL(request.url);
|
|
let durl = url.search.substring(1);
|
|
let components = durl.split(",");
|
|
let data = components.pop();
|
|
components = components.shift().split(":");
|
|
let type = components.pop();
|
|
return new Response(data, {
|
|
headers: { "content-type": type},
|
|
});
|
|
}
|