Skip to content
This repository has been archived by the owner on Oct 4, 2023. It is now read-only.

Commit

Permalink
[Stems] Don't rewrite to /index.html on stems.audius.co (#1836)
Browse files Browse the repository at this point in the history
  • Loading branch information
rickyrombo committed Aug 31, 2022
1 parent 14aa5ac commit 2085ffc
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions packages/stems/scripts/workers-site/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { getAssetFromKV, mapRequestToAsset } from '@cloudflare/kv-asset-handler'

const DEBUG = false

addEventListener('fetch', event => {
addEventListener('fetch', (event) => {
try {
event.respondWith(handleEvent(event))
} catch (e) {
Expand All @@ -27,13 +27,6 @@ async function handleEvent(event) {
}

const options = {}
// Always map requests to `/`
options.mapRequestToAsset = request => {
const url = new URL(request.url)
url.pathname = `/`
return mapRequestToAsset(new Request(url, request))
}

try {
if (DEBUG) {
// customize caching
Expand Down

0 comments on commit 2085ffc

Please sign in to comment.