forked from
rocksky.app/rocksky
A decentralized music tracking and discovery platform built on AT Protocol 馃幍
1/**
2 * Welcome to Cloudflare Workers! This is your first worker.
3 *
4 * - Run `npm run dev` in your terminal to start a development server
5 * - Open a browser tab at http://localhost:8787/ to see your worker in action
6 * - Run `npm run deploy` to publish your worker
7 *
8 * Bind resources to your worker in `wrangler.jsonc`. After adding bindings, a type definition for the
9 * `Env` object can be regenerated with `npm run cf-typegen`.
10 *
11 * Learn more at https://developers.cloudflare.com/workers/
12 */
13
14export default {
15 async fetch(request, env, ctx): Promise<Response> {
16 const proxyUrl = new URL(request.url);
17 proxyUrl.host = 'api.spotify.com';
18 return fetch(proxyUrl, request);
19 },
20} satisfies ExportedHandler<Env>;