Public
Script
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
1
2
3
4
5
6
7
8
9
10
11
import { refToValUrl } from "https://esm.town/v/karfau/refToValUrl";
import { mainReference } from "https://esm.town/v/karfau/mainReference";
export const getRedirectToValResponse = () => {
const url = mainReference(refToValUrl);
return new Response(`Redirecting to <a href="${url}">${url}</a>`, {
status: 303,
headers: { Location: url },
});
};
// Forked from @neverstew.thisValUrl
October 23, 2023